class VagrantPlugins::DigitalOcean::Actions::CheckState

Public Class Methods

new(app, env) click to toggle source
# File lib/vagrant-digitalocean/actions/check_state.rb, line 5
def initialize(app, env)
  @app = app
  @machine = env[:machine]
  @logger = Log4r::Logger.new('vagrant::digitalocean::check_state')
end

Public Instance Methods

call(env) click to toggle source
# File lib/vagrant-digitalocean/actions/check_state.rb, line 11
def call(env)
  env[:machine_state] = @machine.state.id
  @logger.info "Machine state is '#{@machine.state.id}'"
  @app.call(env)
end