Class: VagrantPlugins::ProxyConf::Action::IsEnabled

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-proxyconf/action/is_enabled.rb

Overview

Action which checks if the plugin should be enabled

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ IsEnabled

Returns a new instance of IsEnabled.



6
7
8
# File 'lib/vagrant-proxyconf/action/is_enabled.rb', line 6

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

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
# File 'lib/vagrant-proxyconf/action/is_enabled.rb', line 10

def call(env)
  env[:result] = plugin_enabled?(env[:machine].config.proxy)

  @app.call(env)
end