Class: VagrantPlugins::Triggers::Config::Provisioner

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeProvisioner

Returns a new instance of Provisioner.



8
9
10
11
12
13
14
# File 'lib/vagrant-triggers/config/provisioner.rb', line 8

def initialize
  @options = {
    :good_exit => [0],
    :stderr    => true,
    :stdout    => true
  }
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/vagrant-triggers/config/provisioner.rb', line 5

def options
  @options
end

#trigger_bodyObject (readonly)

Returns the value of attribute trigger_body.



6
7
8
# File 'lib/vagrant-triggers/config/provisioner.rb', line 6

def trigger_body
  @trigger_body
end

Instance Method Details

#fire(&block) ⇒ Object



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

def fire(&block)
  @trigger_body = block
end

#set_options(options) ⇒ Object



20
21
22
# File 'lib/vagrant-triggers/config/provisioner.rb', line 20

def set_options(options)
  @options.merge!(options)
end