Class: Mothership::Progress::Skipper
- Inherits:
-
Object
- Object
- Mothership::Progress::Skipper
- Defined in:
- lib/mothership/progress.rb
Instance Method Summary collapse
- #fail(&callback) ⇒ Object
- #give_up(&callback) ⇒ Object
-
#initialize(&ret) ⇒ Skipper
constructor
A new instance of Skipper.
- #skip(&callback) ⇒ Object
Constructor Details
#initialize(&ret) ⇒ Skipper
Returns a new instance of Skipper.
59 60 61 |
# File 'lib/mothership/progress.rb', line 59 def initialize(&ret) @return = ret end |
Instance Method Details
#fail(&callback) ⇒ Object
71 72 73 |
# File 'lib/mothership/progress.rb', line 71 def fail(&callback) @return.call("FAILED", :error, callback) end |
#give_up(&callback) ⇒ Object
67 68 69 |
# File 'lib/mothership/progress.rb', line 67 def give_up(&callback) @return.call("GAVE UP", :bad, callback) end |
#skip(&callback) ⇒ Object
63 64 65 |
# File 'lib/mothership/progress.rb', line 63 def skip(&callback) @return.call("SKIPPED", :warning, callback) end |