Class: Kitchen::Vagrant::VagrantfileCreator
- Inherits:
-
Object
- Object
- Kitchen::Vagrant::VagrantfileCreator
- Defined in:
- lib/kitchen/vagrant/vagrantfile_creator.rb
Overview
Class to render Vagrantfiles to be used by the Kitchen Vagrant driver.
Instance Method Summary collapse
-
#initialize(instance, config) ⇒ VagrantfileCreator
constructor
A new instance of VagrantfileCreator.
- #render ⇒ Object
Constructor Details
#initialize(instance, config) ⇒ VagrantfileCreator
Returns a new instance of VagrantfileCreator.
28 29 30 31 |
# File 'lib/kitchen/vagrant/vagrantfile_creator.rb', line 28 def initialize(instance, config) @instance = instance @config = config end |
Instance Method Details
#render ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/kitchen/vagrant/vagrantfile_creator.rb', line 33 def render arr = [] arr << %{Vagrant.configure("2") do |c|} common_block(arr) network_block(arr) provider_block(arr) chef_block(arr) berkshelf_block(arr) arr << %{end} arr.join("\n") end |