Class: VagrantPlugins::XenServer::Action::IsSuspended
- Inherits:
-
Object
- Object
- VagrantPlugins::XenServer::Action::IsSuspended
- Defined in:
- lib/vagrant-xenserver/action/is_suspended.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ IsSuspended
constructor
A new instance of IsSuspended.
Constructor Details
#initialize(app, env) ⇒ IsSuspended
Returns a new instance of IsSuspended.
7 8 9 10 |
# File 'lib/vagrant-xenserver/action/is_suspended.rb', line 7 def initialize(app, env) @app = app @logger = Log4r::Logger.new('vagrant_xenserver::action::is_suspended') end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 |
# File 'lib/vagrant-xenserver/action/is_suspended.rb', line 12 def call(env) @logger.info("env[:machine].state.id="+env[:machine].state.id.to_s) env[:result] = env[:machine].state.id == 'Suspended' @app.call(env) end |