Sha256: 96a861f6bb31169bf021e445b64e1eeef0398e559fdd9cac3e54c49d3b8035e0
Contents?: true
Size: 909 Bytes
Versions: 3
Compression:
Stored size: 909 Bytes
Contents
class Nymphia::DSL::Context::Host include Nymphia::DSL::Context::HostContextMethods attr_reader :result def initialize(context, name, description, default_params, gateway_usage, &block) @host_name = name @context = context.merge(host_name: name) @result = { metadata: { host_name: name, description: description, }, } if default_params.nil? @result[:contents] = {} else @default_params = default_params.dup @result[:contents] = @default_params end unless gateway_usage.nil? proxy_command = "ssh #{@context[:gateways][gateway_usage][:metadata][:host_name]} -q -W %h:%p" if @result[:contents]['ProxyCommand'] @result[:contents]['ProxyCommand'] << proxy_command else @result[:contents]['ProxyCommand'] = Array(proxy_command) end end instance_eval(&block) if block end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nymphia-0.2.1 | lib/nymphia/dsl/context/host.rb |
nymphia-0.2.0 | lib/nymphia/dsl/context/host.rb |
nymphia-0.1.2 | lib/nymphia/dsl/context/host.rb |