class SSHKit::Runner::SafeSequential
Attributes
failed[R]
succeeded[R]
Public Class Methods
new(hosts, options = nil, &block)
click to toggle source
Calls superclass method
# 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
Public Instance Methods
execute()
click to toggle source
Calls superclass method
# File lib/gaptool_client/runner.rb, line 18 def execute super rescue return false else return @failed.length == 0 end
Private Instance Methods
run_backend(host, &block)
click to toggle source
# File lib/gaptool_client/runner.rb, line 28 def run_backend(host, &block) backend(host, &block).run rescue => e @failed << { host: host, error: e } raise if @on_errors == :exit else @succeeded << host end