Class: Brewmaster::Configuration
- Inherits:
-
Object
- Object
- Brewmaster::Configuration
- Defined in:
- lib/brewmaster/configuration.rb
Instance Method Summary collapse
- #bootstrap? ⇒ Boolean
- #brews ⇒ Object
- #casks ⇒ Object
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #rubies ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
3 4 5 6 |
# File 'lib/brewmaster/configuration.rb', line 3 def initialize(={}) @bootstrap = .fetch(:bootstrap, false) @config_file = YAML.load_file(.fetch(:config_path, Brewmaster::BOOTSTRAP_CONFIG_PATH)) end |
Instance Method Details
#bootstrap? ⇒ Boolean
8 9 10 |
# File 'lib/brewmaster/configuration.rb', line 8 def bootstrap? @bootstrap end |
#brews ⇒ Object
12 13 14 |
# File 'lib/brewmaster/configuration.rb', line 12 def brews @brews ||= @config_file['brews'] end |
#casks ⇒ Object
16 17 18 |
# File 'lib/brewmaster/configuration.rb', line 16 def casks @casks ||= @config_file['casks'] end |
#rubies ⇒ Object
20 21 22 |
# File 'lib/brewmaster/configuration.rb', line 20 def rubies @rubies ||= @config_file['rubies'] end |