Class: SSHKit::Runner::SafeSequential
- Inherits:
-
Sequential
- Object
- Sequential
- SSHKit::Runner::SafeSequential
- Defined in:
- lib/gaptool_client/runner.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#failed ⇒ Object
readonly
Returns the value of attribute failed.
-
#succeeded ⇒ Object
readonly
Returns the value of attribute succeeded.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(hosts, options = nil, &block) ⇒ SafeSequential
constructor
A new instance of SafeSequential.
Constructor Details
#initialize(hosts, options = nil, &block) ⇒ SafeSequential
Returns a new instance of SafeSequential.
10 11 12 13 14 15 16 |
# File 'lib/gaptool_client/runner.rb', line 10 def initialize(hosts, = nil, &block) ||= {} @on_errors = .delete(:on_errors) || :exit super(hosts, , &block) @failed = [] @succeeded = [] end |
Instance Attribute Details
#failed ⇒ Object (readonly)
Returns the value of attribute failed.
8 9 10 |
# File 'lib/gaptool_client/runner.rb', line 8 def failed @failed end |
#succeeded ⇒ Object (readonly)
Returns the value of attribute succeeded.
8 9 10 |
# File 'lib/gaptool_client/runner.rb', line 8 def succeeded @succeeded end |
Instance Method Details
#execute ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/gaptool_client/runner.rb', line 18 def execute super rescue return false else return @failed.length == 0 end |