Class: Flock::Sandbox::Vagrant

Inherits:
Object
  • Object
show all
Defined in:
lib/flock/sandbox.rb

Instance Method Summary collapse

Constructor Details

#initialize(definition) ⇒ Vagrant

Returns a new instance of Vagrant.



151
152
153
# File 'lib/flock/sandbox.rb', line 151

def initialize(definition)
  @definition = definition
end

Instance Method Details

#runObject



155
156
157
158
# File 'lib/flock/sandbox.rb', line 155

def run
  template = ERB.new(File.read(File.expand_path('../../../resources/vagrant.erb', __FILE__)))
  puts template.result(@definition.instance_eval { binding })
end