class UserInput

Public Instance Methods

askData() click to toggle source

this method will ask the user four questions

# File lib/user_input.rb, line 3
def askData
    puts "Enter the temperature:"
    @temp = gets.chomp.to_f

    puts "Enter the wanted temperature:"
    @set = gets.chomp.to_f

    puts "Enter the unit:"
    @unit = gets.chomp

    puts "Enter the range:"
    @range = gets.chomp.to_f
end
get_range() click to toggle source

this method will give us the range

# File lib/user_input.rb, line 33
def get_range
    return @range
end
get_set() click to toggle source

this method will give us the wanted temperature

# File lib/user_input.rb, line 23
def get_set
    return @set
end
get_temp() click to toggle source

this method will give us the temperature

# File lib/user_input.rb, line 18
def get_temp
    return @temp
end
get_unit() click to toggle source

this method will give us the unit

# File lib/user_input.rb, line 28
def get_unit
    return @unit
end