Class: Float

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

Instance Method Summary collapse

Instance Method Details

#currency_fmtObject



14
15
16
# File 'lib/float.rb', line 14

def currency_fmt
  sprintf("%.2f", self.currency_round)
end

#currency_roundObject



10
11
12
# File 'lib/float.rb', line 10

def currency_round
  (self * 20).round / 20.0
end

#sizeObject



2
3
4
# File 'lib/float.rb', line 2

def size
  to_s.size
end

#stripObject



6
7
8
# File 'lib/float.rb', line 6

def strip
  to_s
end