Class: Integer

Inherits:
Object show all
Defined in:
lib/support/core_extensions.rb

Instance Method Summary collapse

Instance Method Details

#as_costObject



18
19
20
# File 'lib/support/core_extensions.rb', line 18

def as_cost
  self / 100.0
end

#in_hundredthsObject



22
23
24
# File 'lib/support/core_extensions.rb', line 22

def in_hundredths
  self.to_f.in_hundredths
end

#to_currencyObject



26
27
28
# File 'lib/support/core_extensions.rb', line 26

def to_currency
  self.to_f.to_currency
end