Class: Gusteau::Config
- Inherits:
-
Object
show all
- Includes:
- ERB
- Defined in:
- lib/gusteau/config.rb
Constant Summary
collapse
- DEFAULT_CHEF_VERSION =
'11.4.4'
- DEFAULT_CHEF_CONFIG_DIRECTORY =
'/etc/chef'
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from ERB
#read_erb, #read_erb_yaml
Constructor Details
#initialize(config_path) ⇒ Config
Returns a new instance of Config.
23
24
25
26
27
28
29
|
# File 'lib/gusteau/config.rb', line 23
def initialize(config_path)
@config = if File.exists?(config_path)
read_erb_yaml(config_path)
else
abort ".gusteau.yml not found"
end
end
|
Class Method Details
.nodes ⇒ Object
15
16
17
|
# File 'lib/gusteau/config.rb', line 15
def self.nodes
@instance.send(:nodes)
end
|
.read(config_path) ⇒ Object
11
12
13
|
# File 'lib/gusteau/config.rb', line 11
def self.read(config_path)
@instance = Gusteau::Config.new(config_path)
end
|
.settings ⇒ Object
19
20
21
|
# File 'lib/gusteau/config.rb', line 19
def self.settings
@instance.send(:settings)
end
|