Class: Prepcook::Work

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

Instance Method Summary collapse

Constructor Details

#initialize(cooktask, tasklength) ⇒ Work

Returns a new instance of Work.



3
4
5
6
7
8
# File 'lib/prepcook/work.rb', line 3

def initialize(cooktask, tasklength)
    
    @cooktask = cooktask
    @tasklength = tasklength

end

Instance Method Details

#workObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/prepcook/work.rb', line 10

def work
    count = 0

    while count < @tasklength
        sleep 1
        count += 1
    end

    returnString = "Finished #{@cooktask}"
    return returnString
end