Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/oddb2xml/builder.rb
Instance Method Summary collapse
-
#round_by(increment) ⇒ Object
round a given number to the nearest step.
Instance Method Details
#round_by(increment) ⇒ Object
round a given number to the nearest step
8 9 10 |
# File 'lib/oddb2xml/builder.rb', line 8 def round_by(increment) (self / increment).round * increment end |