Sha256: cb5be613298ad7b0953bf8bda3c4924704884ac0710119badc6540538011ca73

Contents?: true

Size: 631 Bytes

Versions: 5

Compression:

Stored size: 631 Bytes

Contents

class Nymphia::DSL::Context::Proxy < Nymphia::DSL::Context::Host
  def initialize(context, name, description, default_params, gateway_usage, &block)
    super(context, name, description, default_params, gateway_usage, &block)
  end

  def local_forward(name, params)
    name = name.to_s

    local_forward_arg = ''
    params.each do |host, port|
      local_forward_arg << "#{host}:#{port} "
    end
    local_forward_arg.strip!

    if @result[:contents]['LocalForward']
      @result[:contents]['LocalForward'] << local_forward_arg
    else
      @result[:contents]['LocalForward'] = Array(local_forward_arg)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
nymphia-0.2.1 lib/nymphia/dsl/context/proxy.rb
nymphia-0.2.0 lib/nymphia/dsl/context/proxy.rb
nymphia-0.1.2 lib/nymphia/dsl/context/proxy.rb
nymphia-0.1.1 lib/nymphia/dsl/context/proxy.rb
nymphia-0.1.0 lib/nymphia/dsl/context/proxy.rb