Class: Metro::Model::NumericProperty
- Defined in:
- lib/metro/models/properties/numeric_property.rb
Overview
The numeric property will simply convert any input into a floating point value. This is the same both on getting and setting.
Constant Summary
Constants included from Units
Instance Attribute Summary
Attributes inherited from Property
Instance Method Summary collapse
Methods inherited from Property
define_property, defined_properties, get, #get, get_or_set, gets, hash_with_default_to_nil, inherited, #initialize, properties, properties_hash, property, #set, set, sets
Constructor Details
This class inherits a constructor from Metro::Model::Property
Instance Method Details
#default_number ⇒ Object
22 23 24 |
# File 'lib/metro/models/properties/numeric_property.rb', line 22 def default_number [:default].to_f end |