Class: Float
- Inherits:
-
Object
- Object
- Float
- Defined in:
- lib/retort/core_ext.rb
Instance Method Summary collapse
Instance Method Details
#fmt ⇒ Object
25 26 27 |
# File 'lib/retort/core_ext.rb', line 25 def fmt "#{sprintf('%.2f', self)}" end |
#percent ⇒ Object
21 22 23 |
# File 'lib/retort/core_ext.rb', line 21 def percent (self * 100).to_i end |