prepcook 0.0.8 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Prepcook
2
- VERSION = "0.0.8"
2
+ VERSION = "1.0.0"
3
3
  end
data/lib/prepcook.rb CHANGED
@@ -4,15 +4,14 @@ require "shell-spinner"
4
4
 
5
5
  module Prepcook
6
6
 
7
- def self.work(cooktask = "chopping", tasklength = 3)
8
- work_finished = String.new
7
+ def self.work(cook_task = "chopping", task_length = 3)
8
+ self.wait_patiently(task_length)
9
+ return "Finished #{cook_task}"
10
+ end
11
+
12
+ def self.wait_patiently(task_length = 0)
9
13
  ShellSpinner do
10
- worker = Work.new(cooktask, tasklength)
11
- work_finished = worker.work
12
- puts work_finished
14
+ sleep task_length
13
15
  end
14
- return work_finished
15
16
  end
16
17
  end
17
-
18
- require 'prepcook/work'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prepcook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -25,7 +25,6 @@ files:
25
25
  - Rakefile
26
26
  - lib/prepcook.rb
27
27
  - lib/prepcook/version.rb
28
- - lib/prepcook/work.rb
29
28
  - prepcook.gemspec
30
29
  - test/test_prepcook.rb
31
30
  homepage: ''
data/lib/prepcook/work.rb DELETED
@@ -1,21 +0,0 @@
1
- class Prepcook::Work
2
-
3
- def initialize(cooktask, tasklength)
4
-
5
- @cooktask = cooktask
6
- @tasklength = tasklength
7
-
8
- end
9
-
10
- def work
11
- count = 0
12
-
13
- while count < @tasklength
14
- sleep 1
15
- count += 1
16
- end
17
-
18
- returnString = "Finished #{@cooktask}"
19
- return returnString
20
- end
21
- end