Class: VagrantPlugins::VagrantHook::HookActionAbstract
- Inherits:
-
Object
- Object
- VagrantPlugins::VagrantHook::HookActionAbstract
- Defined in:
- lib/vagrant_hook/plugin.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env, callbacks_list) ⇒ HookActionAbstract
constructor
A new instance of HookActionAbstract.
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 |