Class: VagrantPlugins::Skytap::Action::RunEnvironment

Inherits:
Object
  • Object
show all
Includes:
Vagrant::Util::Retryable
Defined in:
lib/vagrant-skytap/action/run_environment.rb

Overview

Runs the Skytap environment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ RunEnvironment

Returns a new instance of RunEnvironment.



12
13
14
15
16
# File 'lib/vagrant-skytap/action/run_environment.rb', line 12

def initialize(app, env)
  @app = app
  @env = env
  @logger = Log4r::Logger.new("vagrant_skytap::action::run_environment")
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



10
11
12
# File 'lib/vagrant-skytap/action/run_environment.rb', line 10

def env
  @env
end

Instance Method Details

#call(env) ⇒ Object



18
19
20
21
22
23
# File 'lib/vagrant-skytap/action/run_environment.rb', line 18

def call(env)
  env[:ui].info(I18n.t("vagrant_skytap.launching_instance"))
  environment.run!

  @app.call(env)
end

#environmentObject



25
26
27
# File 'lib/vagrant-skytap/action/run_environment.rb', line 25

def environment
  env[:environment]
end