Method: Converter#convert_to_i

Defined in:
lib/utils/convert.rb

#convert_to_i(val) ⇒ Object

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



8
9
10
11
# File 'lib/utils/convert.rb', line 8

def convert_to_i(val)
  val = val.to_i if val =~ /^\d+$/
  val
end