Sha256: e865df19c95c335a739da055bb297aae53d943f9620449026555c52e3df0a79a

Contents?: true

Size: 818 Bytes

Versions: 12

Compression:

Stored size: 818 Bytes

Contents

# Vagrant forwarded port model
#
# @see http://docs.vagrantup.com/v2/networking/forwarded_ports.html
class ConfigBuilder::Model::Network::ForwardedPort < ConfigBuilder::Model::Base

  # @!attribute [rw] guest
  #   @return [Fixnum] The guest port
  def_model_attribute :guest

  # @!attribute [rw] host
  #   @return [Fixnum] The host port
  def_model_attribute :host

  # @!attribute [rw] auto_correct
  #   @return [Boolean] Whether to automatically correct port collisions
  def_model_attribute :auto_correct

  def initialize
    @defaults = {:auto_correct => false}
  end

  def to_proc
    Proc.new do |vm_config|
      vm_config.network(
        :forwarded_port,
        :guest        => attr(:guest),
        :host         => attr(:host),
        :auto_correct => attr(:auto_correct)
      )
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
vagrant-config_builder-0.10.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.9.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.8.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.7.1 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.7.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.6.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.5.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.4.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.3.1 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.3.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.2.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.1.0 lib/config_builder/model/network/forwarded_port.rb