Class: Prepcook::Work
- Inherits:
-
Object
- Object
- Prepcook::Work
- Defined in:
- lib/prepcook/work.rb
Instance Method Summary collapse
-
#initialize(cooktask, tasklength) ⇒ Work
constructor
A new instance of Work.
- #work ⇒ Object
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
#work ⇒ Object
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 |