mirror of
https://github.com/inspec/inspec
synced 2024-11-23 21:23:29 +00:00
659b4b373a
Signed-off-by: Miah Johnson <miah@chia-pet.org>
11 lines
247 B
Ruby
11 lines
247 B
Ruby
# author: Dominik Richter
|
|
# author: Christoph Hartmann
|
|
|
|
module Converter
|
|
# convert the value to an integer if we have numbers only
|
|
# otherwise we return the string
|
|
def convert_to_i(val)
|
|
val = val.to_i if val =~ /^\d+$/
|
|
val
|
|
end
|
|
end
|