class Goaltender::ValueParser::Integer
Constants
- REGEX
Public Instance Methods
parse()
click to toggle source
# File lib/goaltender/value_parser/integer.rb, line 7 def parse return 0 unless input_value.present? return input_value if input_value.is_a?(Fixnum) return input_value.to_i if input_value.is_a?(Float) input_value.scan(REGEX).join.try(:to_i) end