Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/lib/util.rb
Instance Method Summary collapse
Instance Method Details
#from_c ⇒ Object
51 52 53 |
# File 'lib/lib/util.rb', line 51 def from_c (self.to_f / 100) end |
#to_b ⇒ Object
55 56 57 |
# File 'lib/lib/util.rb', line 55 def to_b return (not (self.zero?)) end |
#to_c ⇒ Object
47 48 49 |
# File 'lib/lib/util.rb', line 47 def to_c (self.to_f * 100).round.to_i end |