Class: Form

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

Instance Method Summary collapse

Instance Method Details

#addDataObject



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

def addData
    puts "1/4: Enter Current Temparture"
    @ctemp = gets.chomp

    puts "2/4: Enter Unit (k, f, c)"
    @unit = gets.chomp

    puts "3/4: Enter Range"
    @range = gets.chomp

    puts "4/4: Enter Wanted Temparture"
    @wtemp = gets.chomp
end

#getDataObject



16
17
18
19
20
21
# File 'lib/form.rb', line 16

def getData
    data = { "ctemp" => @ctemp.to_f,
            "unit" => @unit,
            "range" => @range.to_f,
            "wtemp" => @wtemp.to_f}
end