Class: VagrantPlugins::VagrantDotenv::Action::IsEnabled
- Inherits:
-
Object
- Object
- VagrantPlugins::VagrantDotenv::Action::IsEnabled
- Defined in:
- lib/vagrant-dotenv/action/is_enabled.rb
Overview
Middleware which uses configuration to check to see if Dotenv plugin has been enabled to run.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ IsEnabled
constructor
A new instance of IsEnabled.
Constructor Details
#initialize(app, env) ⇒ IsEnabled
Returns a new instance of IsEnabled.
10 11 12 |
# File 'lib/vagrant-dotenv/action/is_enabled.rb', line 10 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 |
# File 'lib/vagrant-dotenv/action/is_enabled.rb', line 14 def call(env) env[:result] = plugin_enabled?(env[:global_config]) @app.call(env) end |