Class: Inputomatic::Number
- Inherits:
-
ActiveRecord::Type::Value
- Object
- ActiveRecord::Type::Value
- Inputomatic::Number
- Defined in:
- lib/inputomatic/number.rb
Instance Method Summary collapse
Instance Method Details
#cast_value(value) ⇒ Object
3 4 5 |
# File 'lib/inputomatic/number.rb', line 3 def cast_value(value) value.is_a?(String) ? ArithmeticInterpreter.new(value).parse : value end |