Class: VagrantPlugins::VagrantHook::HooksConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_hook/plugin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHooksConfig

Returns a new instance of HooksConfig.



8
9
10
11
12
# File 'lib/vagrant_hook/plugin.rb', line 8

def initialize
		@check_outdated_callbacks = []
		@add_box_callbacks = []
		@prepare_clone_callbacks = []
end

Instance Attribute Details

#add_box_callbacksObject

Returns the value of attribute add_box_callbacks.



5
6
7
# File 'lib/vagrant_hook/plugin.rb', line 5

def add_box_callbacks
  @add_box_callbacks
end

#check_outdated_callbacksObject

Returns the value of attribute check_outdated_callbacks.



4
5
6
# File 'lib/vagrant_hook/plugin.rb', line 4

def check_outdated_callbacks
  @check_outdated_callbacks
end

#prepare_clone_callbacksObject

Returns the value of attribute prepare_clone_callbacks.



6
7
8
# File 'lib/vagrant_hook/plugin.rb', line 6

def prepare_clone_callbacks
  @prepare_clone_callbacks
end

Instance Method Details

#on_add_box(&proc) ⇒ Object



18
19
20
# File 'lib/vagrant_hook/plugin.rb', line 18

def on_add_box(&proc)
		@add_box_callbacks << {:mproc => proc}
end

#on_check_outdated(&proc) ⇒ Object



14
15
16
# File 'lib/vagrant_hook/plugin.rb', line 14

def on_check_outdated(&proc)
		@check_outdated_callbacks << {:mproc => proc}
end

#on_prepare_clone(&proc) ⇒ Object



22
23
24
# File 'lib/vagrant_hook/plugin.rb', line 22

def on_prepare_clone(&proc)
		@prepare_clone_callbacks << {:mproc => proc}
end