Class: Vagrant::ChefConfig::Action::LoadChefConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-chefconfig/action/load_chef_config.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ LoadChefConfig

Returns a new instance of LoadChefConfig.



8
9
10
# File 'lib/vagrant-chefconfig/action/load_chef_config.rb', line 8

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

Instance Method Details

#call(env) ⇒ Object



12
13
14
15
16
17
# File 'lib/vagrant-chefconfig/action/load_chef_config.rb', line 12

def call(env)
  if env[:machine].config.chefconfig.enabled
    ChefClientConfigurator.new(env).apply_knife_config()
  end
  @app.call(env)
end