Round by an arbitrary step in Ruby