Class: Superstore::Types::IntegerType
- Defined in:
- lib/superstore/types/integer_type.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#cast_value(value) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/superstore/types/integer_type.rb', line 4 def cast_value(value) if value.is_a?(String) Integer(value, 10) else Integer(value) end rescue end |