Class: Servitor::Vagrantfile

Inherits:
Object
  • Object
show all
Defined in:
lib/provisioners/vagrantfile.rb

Instance Method Summary collapse

Constructor Details

#initialize(services, ssh_dir) ⇒ Vagrantfile

Returns a new instance of Vagrantfile.



22
23
24
25
# File 'lib/provisioners/vagrantfile.rb', line 22

def initialize(services, ssh_dir)
  @services = services
  @ssh_dir = ssh_dir
end

Instance Method Details

#generateObject



27
28
29
30
31
32
# File 'lib/provisioners/vagrantfile.rb', line 27

def generate
  template_path = File.join(File.dirname(__FILE__), 'Vagrantfile.erb')
  eruby = Erubis::Eruby.load_file(template_path)
  context = Erubis::Context.new(:services => @services, :ssh_dir => @ssh_dir)
  eruby.evaluate(context)
end