Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/oddb2xml/builder.rb

Instance Method Summary collapse

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