Sha256: ae60d995b6534b792d3899f6f89cc51dd101abc2985df84d8b4486bbe8e1e0ce

Contents?: true

Size: 591 Bytes

Versions: 1

Compression:

Stored size: 591 Bytes

Contents

module VagrantShellCommander
  # Action for shell command hooking
  class Action
    # Constructor
    #
    # @param app [Action] Next middleware to call
    # @param env [Hash] Action environment
    # @return nil
    #
    def initialize(app, env)
      @app = app
      @machine = env[:machine]
    end

    # Call method of this middleware
    #
    # @param env [Hash] Action environment
    # @return nil
    #
    def call(env)
      @app.call(env)
      @machine.action(:ssh_run, 
                      ssh_run_command: env[:global_config].sh.after_share_folders)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-shell-commander-0.2.0 lib/vagrant-shell-commander/action.rb