Class: VagrantPlugins::Skytap::Action::RunVm
- Includes:
- Vagrant::Util::Retryable, ActionHelpers
- Defined in:
- lib/vagrant-skytap/action/run_vm.rb
Overview
Runs the Skytap VM.
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
- #call(env) ⇒ Object
- #environment ⇒ Object
-
#initialize(app, env) ⇒ RunVm
constructor
A new instance of RunVm.
Methods included from ActionHelpers
Constructor Details
#initialize(app, env) ⇒ RunVm
Returns a new instance of RunVm.
36 37 38 39 40 |
# File 'lib/vagrant-skytap/action/run_vm.rb', line 36 def initialize(app, env) @app = app @env = env @logger = Log4r::Logger.new("vagrant_skytap::action::run_vm") end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
34 35 36 |
# File 'lib/vagrant-skytap/action/run_vm.rb', line 34 def env @env end |
Instance Method Details
#call(env) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/vagrant-skytap/action/run_vm.rb', line 42 def call(env) env[:ui].info(I18n.t("vagrant_skytap.launching_vm")) current_vm(env).run! @app.call(env) end |
#environment ⇒ Object
49 50 51 |
# File 'lib/vagrant-skytap/action/run_vm.rb', line 49 def environment env[:environment] end |