Class: VagrantPlugins::VagrantHook::HookActionAbstract

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

Instance Method Summary collapse

Constructor Details

#initialize(app, env, callbacks_list) ⇒ HookActionAbstract

Returns a new instance of HookActionAbstract.



28
29
30
31
# File 'lib/vagrant_hook/plugin.rb', line 28

def initialize(app, env, callbacks_list)
  @app = app
		  @callbacks_list = callbacks_list
end

Instance Method Details

#call(env) ⇒ Object



33
34
35
36
37
38
39
40
41
# File 'lib/vagrant_hook/plugin.rb', line 33

def call(env)
		  callbacks = @callbacks_list.call
		  
		  callbacks.each do | clbk |
			clbk[:mproc].call(env)
		  end
		 
		  @app.call(env)
end