Class: Float

Inherits:
Object show all
Defined in:
lib/gci-class-extensions.rb

Overview

TODO write a spec

Instance Method Summary collapse

Instance Method Details

#to_percentage(precision = 2) ⇒ Object



73
74
75
# File 'lib/gci-class-extensions.rb', line 73

def to_percentage(precision=2)
  (self * 100).round(precision)
end