module Converter

Public Instance Methods

convert_to_i(val) click to toggle source

convert the value to an integer if we have numbers only otherwise we return the string

# File lib/inspec/utils/convert.rb, line 4
def convert_to_i(val)
  val = val.to_i if val =~ /^\d+$/
  val
end