Class: Integer

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

Instance Method Summary collapse

Instance Method Details

#humanizeObject



20
21
22
23
24
25
26
27
28
29
# File 'lib/mizuho_bank.rb', line 20

def humanize
  case 
  when self < 1000
    self
  when self < 1000000
    (self / 1000).to_s + "千円"
  when self < 1000000000
    (self / 1000000).to_s + "百万"
  end
end