Class: Float
- Inherits:
-
Object
- Object
- Float
- Defined in:
- lib/float.rb
Instance Method Summary collapse
Instance Method Details
#currency_fmt ⇒ Object
14 15 16 |
# File 'lib/float.rb', line 14 def currency_fmt sprintf("%.2f", self.currency_round) end |
#currency_round ⇒ Object
10 11 12 |
# File 'lib/float.rb', line 10 def currency_round (self * 20).round / 20.0 end |
#size ⇒ Object
2 3 4 |
# File 'lib/float.rb', line 2 def size to_s.size end |
#strip ⇒ Object
6 7 8 |
# File 'lib/float.rb', line 6 def strip to_s end |