module SSHKit::Custom::DSL::Helper

Constants

LOGGING_METHODS

Public Class Methods

create_backend_delegator(method) click to toggle source

@api private @!macro [attach] dsl_helper.create_backend_delegator

@!method $1(*args, &block)
@api public
@dsl
Delegates $1 to the active backend
# File lib/sshkit/custom/dsl/helper.rb, line 13
def self.create_backend_delegator(method)
  define_method method do |*args|
    active_backend.send method, *args
  end
end

Public Instance Methods

Host(rh) click to toggle source

Conversion function. Converts a host name into a Host object. @param rh [String, SSHKit::Host] The hostname or a SSHKit::Host object @dsl

# File lib/sshkit/custom/dsl/helper.rb, line 42
def Host(rh)
  if rh.is_a?(SSHKit::Host)
    rh
  else
    SSHKit::Host.new(rh)
  end
end
_config_store() click to toggle source

@api private

# File lib/sshkit/custom/dsl/helper.rb, line 51
def _config_store
  @_config_store ||= SSHKit::Custom::Config::Store
end
active_backend() click to toggle source

Returns the active backend in the current thread @dsl @see SSHKit::Custom::Config::Store#active_backend

# File lib/sshkit/custom/dsl/helper.rb, line 22
def active_backend
  SSHKit::Custom::Config::Store.active_backend
end
host() click to toggle source

Return the host of the active backend

# File lib/sshkit/custom/dsl/helper.rb, line 27
def host
  active_backend.host
end