Class: MotherBrain::Chef::Config
- Inherits:
-
Hash
- Object
- Hash
- MotherBrain::Chef::Config
- Defined in:
- lib/mb/chef/config.rb
Overview
Handles loading configuration values from a Chef config file
Constant Summary collapse
- DEFAULT_PATHS =
%w[ ./.chef/knife.rb ~/.chef/knife.rb /etc/chef/solo.rb /etc/chef/client.rb ]
Instance Method Summary collapse
-
#initialize(path = nil) ⇒ Config
constructor
A new instance of Config.
-
#parse ⇒ Knife
Parse the file for the path and store symbolicated keys for knife configuration options.
Constructor Details
#initialize(path = nil) ⇒ Config
Returns a new instance of Config.
13 14 15 |
# File 'lib/mb/chef/config.rb', line 13 def initialize(path = nil) @path = path end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(key, value = nil) ⇒ Object (private)
37 38 39 |
# File 'lib/mb/chef/config.rb', line 37 def method_missing(key, value = nil) store key.to_sym, value end |
Instance Method Details
#parse ⇒ Knife
Parse the file for the path and store symbolicated keys for knife configuration options.
21 22 23 24 |
# File 'lib/mb/chef/config.rb', line 21 def parse parse_file self end |