Class: Float
- Inherits:
-
Object
- Object
- Float
- Defined in:
- lib/isoelectric_point/extensions.rb
Instance Method Summary collapse
Instance Method Details
#round_to_places(places) ⇒ Object
2 3 4 |
# File 'lib/isoelectric_point/extensions.rb', line 2 def round_to_places(places) sprintf("%#{self.to_s.length}.#{places}f", self).to_f end |