Class: Ladder::Command
- Inherits:
-
Escort::ActionCommand::Base
- Object
- Escort::ActionCommand::Base
- Ladder::Command
- Defined in:
- lib/chef/ladder.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#selected_cookbooks ⇒ Object
A list of Ladder::Cookbook objects If the arguments list is empty, all cookbooks are used.
Instance Method Details
#execute ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/chef/ladder.rb', line 21 def execute # Load Chef configuration @@chef_config ||= Chef::Config.from_file([:knife]) # Load Ladderfile configuration @sources = Ladder::Sources.from_file([:config]) end |
#selected_cookbooks ⇒ Object
A list of Ladder::Cookbook objects If the arguments list is empty, all cookbooks are used
31 32 33 34 |
# File 'lib/chef/ladder.rb', line 31 def selected_cookbooks names = arguments.empty? ? @sources.keys : arguments names.map { |name| @sources[name] } end |