Method: Numeric#nearest
- Defined in:
- lib/active_form/core_extensions.rb
#nearest(factor = 10) ⇒ Object
| 52 53 54 | # File 'lib/active_form/core_extensions.rb', line 52 def nearest(factor = 10) (self.to_f/factor.to_f).round * factor end |