class SSHKit::Runner::Abstract
Attributes
block[R]
hosts[R]
options[R]
Public Class Methods
new(hosts, options = nil, &block)
click to toggle source
# File lib/j-cap-recipes/sshkit_runner_patch.rb, line 13 def initialize(hosts, options = nil, &block) @hosts = Array(hosts) @options = options || {} @block = block end
Private Instance Methods
backend(host, &block)
click to toggle source
# File lib/j-cap-recipes/sshkit_runner_patch.rb, line 21 def backend(host, &block) backend_factory.new(host, &block) end
backend_factory()
click to toggle source
# File lib/j-cap-recipes/sshkit_runner_patch.rb, line 25 def backend_factory case @options[:backend] when Symbol SSHKit::Backend.const_get(@options[:backend].to_s.split('_').collect(&:capitalize).join) when String Kernel.const_get(@options[:backend]) when nil SSHKit.config.backend else @options[:backend] end end