Class: Outback::Task
- Inherits:
-
Object
- Object
- Outback::Task
- Defined in:
- lib/outback/task.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize ⇒ Task
constructor
A new instance of Task.
- #rollback(&block) ⇒ Object
- #rollout(&block) ⇒ Object
Constructor Details
#initialize ⇒ Task
Returns a new instance of Task.
13 14 15 16 17 |
# File 'lib/outback/task.rb', line 13 def initialize @rollout, @rollback = lambda {} @stdout = StringIO.new @stderr = StringIO.new end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/outback/task.rb', line 10 def name @name end |
#stderr ⇒ Object
Returns the value of attribute stderr.
11 12 13 |
# File 'lib/outback/task.rb', line 11 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout.
11 12 13 |
# File 'lib/outback/task.rb', line 11 def stdout @stdout end |
Instance Method Details
#rollback(&block) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/outback/task.rb', line 27 def rollback( &block ) if block_given? @rollback = block else run @rollback end end |
#rollout(&block) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/outback/task.rb', line 19 def rollout( &block ) if block_given? @rollout = block else run @rollout end end |