Class: Configuration::Configuration
- Inherits:
-
Object
- Object
- Configuration::Configuration
- Defined in:
- lib/bujo/configuration/configuration.rb
Instance Attribute Summary collapse
-
#editor ⇒ Object
readonly
Returns the value of attribute editor.
-
#extra_plugins ⇒ Object
readonly
Returns the value of attribute extra_plugins.
-
#mandatory_plugins ⇒ Object
readonly
Returns the value of attribute mandatory_plugins.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#editor ⇒ Object (readonly)
Returns the value of attribute editor.
10 11 12 |
# File 'lib/bujo/configuration/configuration.rb', line 10 def editor @editor end |
#extra_plugins ⇒ Object (readonly)
Returns the value of attribute extra_plugins.
10 11 12 |
# File 'lib/bujo/configuration/configuration.rb', line 10 def extra_plugins @extra_plugins end |
#mandatory_plugins ⇒ Object (readonly)
Returns the value of attribute mandatory_plugins.
10 11 12 |
# File 'lib/bujo/configuration/configuration.rb', line 10 def mandatory_plugins @mandatory_plugins end |
Class Method Details
.load(configuration_file = "bujo.yaml") ⇒ Object
22 23 24 25 26 |
# File 'lib/bujo/configuration/configuration.rb', line 22 def self.load(configuration_file = "bujo.yaml") yaml = Psych.load_file(configuration_file) plugins = (yaml['plugins'] || []) Configuration.new(plugins, Editor.new(yaml['editor'])) end |
Instance Method Details
#plugins ⇒ Object
18 19 20 |
# File 'lib/bujo/configuration/configuration.rb', line 18 def plugins [@mandatory_plugins, @extra_plugins].flatten end |