Class: UserInput
- Inherits:
-
Object
- Object
- UserInput
- Defined in:
- lib/user_input.rb
Instance Method Summary collapse
Instance Method Details
#askData ⇒ Object
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_range ⇒ Object
28 29 30 |
# File 'lib/user_input.rb', line 28 def get_range return @range end |
#get_set ⇒ Object
20 21 22 |
# File 'lib/user_input.rb', line 20 def get_set return @set end |
#get_temp ⇒ Object
16 17 18 |
# File 'lib/user_input.rb', line 16 def get_temp return @temp end |
#get_unit ⇒ Object
24 25 26 |
# File 'lib/user_input.rb', line 24 def get_unit return @unit end |