Class: Neows::Attributes::SanitizedInteger
- Inherits:
-
Virtus::Attribute
- Object
- Virtus::Attribute
- Neows::Attributes::SanitizedInteger
- Defined in:
- lib/neows/attributes.rb
Instance Method Summary collapse
-
#coerce(value) ⇒ Integer
Coerces a string with commas to an Integer.
Instance Method Details
#coerce(value) ⇒ Integer
Coerces a string with commas to an Integer
8 9 10 |
# File 'lib/neows/attributes.rb', line 8 def coerce(value) value.delete(',').to_i end |