Class: Molder::Configuration
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- Molder::Configuration
- Defined in:
- lib/molder/configuration.rb
Constant Summary collapse
- DEFAULT_CONFIG =
'config/molder.yml'.freeze
Class Method Summary collapse
Class Method Details
.default ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/molder/configuration.rb', line 13 def default if File.exist?(default_config) load(default_config) else raise ::Molder::ConfigNotFound, "Default file #{default_config} was not found" end end |
.default_config ⇒ Object
9 10 11 |
# File 'lib/molder/configuration.rb', line 9 def default_config DEFAULT_CONFIG end |
.load(file) ⇒ Object
22 23 24 |
# File 'lib/molder/configuration.rb', line 22 def load(file) self.new(YAML.load(File.read(file))) end |