Class: VagrantPlugins::ShellCommander::Action
- Inherits:
-
Object
- Object
- VagrantPlugins::ShellCommander::Action
- Includes:
- Vagrant::Action::Builtin
- Defined in:
- lib/vagrant-shell-commander/action.rb
Overview
Action for shell command hooking
Instance Method Summary collapse
-
#call(env) ⇒ Object
Call method of this middleware.
-
#initialize(app, env) ⇒ Object
constructor
Constructor.
Constructor Details
#initialize(app, env) ⇒ Object
Constructor
13 14 15 16 |
# File 'lib/vagrant-shell-commander/action.rb', line 13 def initialize(app, env) @app = app @machine = env[:machine] end |
Instance Method Details
#call(env) ⇒ Object
Call method of this middleware
23 24 25 26 27 28 29 30 |
# File 'lib/vagrant-shell-commander/action.rb', line 23 def call(env) @app.call(env) unless env[:global_config].sh.after_share_folders.nil? @machine.action(:ssh_run, ssh_run_command: env[:global_config].sh.after_share_folders, ssh_opts: {extra_args: []}) end end |