Class: VagrantPlugins::VagrantNotifyForwarder::Action::CheckBootState

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-notify-forwarder/action/check_boot_state.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ CheckBootState

Returns a new instance of CheckBootState.



5
6
7
# File 'lib/vagrant-notify-forwarder/action/check_boot_state.rb', line 5

def initialize(app, env)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
13
14
# File 'lib/vagrant-notify-forwarder/action/check_boot_state.rb', line 9

def call(env)
  return unless env[:machine].config.notify_forwarder.enable
  $BOOT_SAVED = env[:machine].state.id == :saved

  @app.call env
end