Class: Float
- Inherits:
-
Object
- Object
- Float
- Defined in:
- lib/simple_helper/float/trim.rb
Instance Method Summary collapse
Instance Method Details
#trim ⇒ Object
4 5 6 7 8 |
# File 'lib/simple_helper/float/trim.rb', line 4 def trim i = to_i f = to_f i == f ? i : f.round(1) end |