Class: Neows::Attributes::SanitizedFloat
- Inherits:
-
Virtus::Attribute
- Object
- Virtus::Attribute
- Neows::Attributes::SanitizedFloat
- Defined in:
- lib/neows/attributes.rb
Instance Method Summary collapse
-
#coerce(value) ⇒ Float
Coerces a string with commas to a Float.
Instance Method Details
#coerce(value) ⇒ Float
Coerces a string with commas to a Float
18 19 20 |
# File 'lib/neows/attributes.rb', line 18 def coerce(value) value.delete(',').to_f end |