Class: Vagrant::DSL::Prison

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
GenericMixin
Defined in:
lib/vagrant/dsl.rb

Instance Attribute Summary collapse

Attributes included from GenericMixin

#env, #ui_class

Instance Method Summary collapse

Methods included from GenericMixin

#vagrant, #vagrant_capture

Constructor Details

#initialize(args) ⇒ Prison

Returns a new instance of Prison.



96
97
98
99
100
# File 'lib/vagrant/dsl.rb', line 96

def initialize(args)
  @config = Vagrant::Prison.new(args[:dir], args.has_key?(:auto_destroy) ? args[:auto_destroy] : true)
  self.ui_class = args[:ui_class]
  @env = nil
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



93
94
95
# File 'lib/vagrant/dsl.rb', line 93

def config
  @config
end

Instance Method Details

#construct_envObject



102
103
104
# File 'lib/vagrant/dsl.rb', line 102

def construct_env
  @config.construct(:ui_class => ui_class)
end