Sha256: 610bf0f0145ada3c96351c5a91e142d245f2641f2a3ccde42df7ffa780d789ff
Contents?: true
Size: 863 Bytes
Versions: 4
Compression:
Stored size: 863 Bytes
Contents
module VagrantPlugins module Invade module InvadeModule module Vagrant class Vagrantfile < InvadeModule attr_reader :result attr_accessor :vagrantfile_data def initialize(vagrantfile_data, result: nil) @vagrantfile_data = vagrantfile_data @result = result end def build b = binding begin # Set variables for template files hostmanager = @vagrantfile_data['hostmanager'] machines = @vagrantfile_data['machines'] eruby = Erubis::Eruby.new(File.read(self.get_template_path(__FILE__))) @result = eruby.result b rescue TypeError, SyntaxError, SystemCallError => e raise(e) end end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems