Class: SSHKit::Runner::SafeSequential

Inherits:
Sequential
  • Object
show all
Defined in:
lib/gaptool_client/runner.rb

Direct Known Subclasses

SafeParallel

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = nil, &block)
  options ||= {}
  @on_errors = options.delete(:on_errors) || :exit
  super(hosts, options, &block)
  @failed = []
  @succeeded = []
end

Instance Attribute Details

#failedObject (readonly)

Returns the value of attribute failed.



8
9
10
# File 'lib/gaptool_client/runner.rb', line 8

def failed
  @failed
end

#succeededObject (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

#executeObject



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