Class: UserInput

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

Instance Method Summary collapse

Instance Method Details

#askDataObject



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/user_input.rb', line 2

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_rangeObject



28
29
30
# File 'lib/user_input.rb', line 28

def get_range
    return @range
end

#get_setObject



20
21
22
# File 'lib/user_input.rb', line 20

def get_set
    return @set
end

#get_tempObject



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

def get_temp
    return @temp
end

#get_unitObject



24
25
26
# File 'lib/user_input.rb', line 24

def get_unit
    return @unit
end