Sha256: 52002c95a78a63eb7ea1cd17d4791e65cd718bf1ccf299360f75fe8343486c2f

Contents?: true

Size: 998 Bytes

Versions: 8

Compression:

Stored size: 998 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

  # @!attribute [rw] id
  #   @return [String, nil] An optional name used to identify this port forward
  def_model_attribute :id

  def initialize
    @defaults = {:auto_correct => false, :id => nil}
  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),
        :id           => attr(:id),
      )
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
vagrant-config_builder-0.15.1 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.15.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.14.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.13.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-masonry-0.13.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.12.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.11.0 lib/config_builder/model/network/forwarded_port.rb
vagrant-config_builder-0.10.1 lib/config_builder/model/network/forwarded_port.rb