Class: Barometer::Data::Attribute::Float
- Inherits:
-
Virtus::Attribute
- Object
- Virtus::Attribute
- Barometer::Data::Attribute::Float
- Defined in:
- lib/barometer/data/attributes/float.rb
Instance Method Summary collapse
Instance Method Details
#coerce(value, *args) ⇒ Object
5 6 7 |
# File 'lib/barometer/data/attributes/float.rb', line 5 def coerce(value, *args) value ? value.to_f : default_value.call end |