Class: VagrantProtect::Command
- Inherits:
-
Object
- Object
- VagrantProtect::Command
- Defined in:
- lib/vagrant-protect/command.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(app, env) ⇒ Command
Returns a new instance of Command.
7 8 9 10 |
# File 'lib/vagrant-protect/command.rb', line 7 def initialize(app, env) @app = app @env = env end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/vagrant-protect/command.rb', line 12 def call(env) if env[:machine].config.protect.enabled env[:ui].info "You can not shutdown the instance because destroy command is disabled in the configuration" return end @app.call(env) end |