Class: ARSerializeHelpers::Integer
- Inherits:
-
Object
- Object
- ARSerializeHelpers::Integer
- Defined in:
- lib/ar-serialize-helpers/integer.rb
Instance Method Summary collapse
Instance Method Details
#dump(float) ⇒ Object
3 4 5 |
# File 'lib/ar-serialize-helpers/integer.rb', line 3 def dump float (float.to_f * 100.0).round if float != nil end |
#load(int) ⇒ Object
7 8 9 |
# File 'lib/ar-serialize-helpers/integer.rb', line 7 def load int int / 100.0 if int end |