Module: TemperatureConvertGem

Defined in:
lib/temperature_convert_gem.rb,
lib/temperature_convert_gem/version.rb

Defined Under Namespace

Classes: Error

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.degreeCtoF(input) ⇒ Object



12
13
14
# File 'lib/temperature_convert_gem.rb', line 12

def self.degreeCtoF(input)
  puts "#{input.to_f * 9 / 5 + 32}"
end

.degreeCtoKelvin(input) ⇒ Object



16
17
18
# File 'lib/temperature_convert_gem.rb', line 16

def self.degreeCtoKelvin(input)
  puts "#{input.to_f+273.15}"
end

.degreeFtoC(input) ⇒ Object



8
9
10
# File 'lib/temperature_convert_gem.rb', line 8

def self.degreeFtoC(input)
  puts "#{(input.to_f-32)*5/9}"
end