Class: VagrantPlugins::Triggers::Provisioner

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-triggers/provisioner.rb

Instance Method Summary collapse

Constructor Details

#initialize(machine, config) ⇒ Provisioner

Returns a new instance of Provisioner.



4
5
6
7
8
9
10
11
# File 'lib/vagrant-triggers/provisioner.rb', line 4

def initialize(machine, config)
  @config  = config
  begin
    @dsl = DSL.new(machine, @config.options)
  rescue Errors::NotMatchingMachine
    ENV["VAGRANT_NO_TRIGGERS"] = "1"
  end
end

Instance Method Details

#cleanupObject



22
23
# File 'lib/vagrant-triggers/provisioner.rb', line 22

def cleanup
end

#configure(root_config) ⇒ Object



13
14
# File 'lib/vagrant-triggers/provisioner.rb', line 13

def configure(root_config)
end

#provisionObject



16
17
18
19
20
# File 'lib/vagrant-triggers/provisioner.rb', line 16

def provision
  unless ENV["VAGRANT_NO_TRIGGERS"]
    @dsl.instance_eval &@config.trigger_body
  end
end