Sha256: 4c610fb0caf216be9f0806b35e7d59bf0443e83d6c9b80a73c2b8c72609df83a
Contents?: true
Size: 739 Bytes
Versions: 15
Compression:
Stored size: 739 Bytes
Contents
module VagrantPlugins module Invade module Builder require 'erubis' class Vagrantfile attr_reader :result attr_accessor :definitions def initialize(definitions, result: nil) @definitions = definitions @result = result end def build b = binding template_file = "#{TEMPLATE_PATH}/v2.erb" begin # definitions for vagrantfile to build definitions = @definitions eruby = Erubis::Eruby.new(File.read(template_file)) @result = eruby.result b rescue TypeError, SyntaxError, SystemCallError => e raise(e) end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems