Top Level Namespace

Defined Under Namespace

Modules: Z16020tmTmoriai

Instance Method Summary collapse

Instance Method Details

#calcage(year, month, day) ⇒ Object



4
5
6
7
8
# File 'lib/z16020tm_tmoriai.rb', line 4

def calcage(year, month, day)
  d1 = Date.new(year, month, day).strftime("%Y%m%d").to_i
  d2 = Date.today.strftime("%Y%m%d").to_i
  puts (d2-d1) / 10000
end

#calcbmi(height, weight) ⇒ Object



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

def calcbmi(height, weight)
  puts weight / (height * height)
end

#convertMessage(message) ⇒ Object



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

def convertMessage(message)
  puts message.swapcase
end