Class: Tone::Configuration::Loader
- Inherits:
-
Object
- Object
- Tone::Configuration::Loader
- Defined in:
- lib/tone/configuration/loader.rb
Overview
Loads the default configuration into memory as a frozen hash.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(path = Pathname("#{__dir__}/defaults.yml")) ⇒ Loader
constructor
A new instance of Loader.
Constructor Details
#initialize(path = Pathname("#{__dir__}/defaults.yml")) ⇒ Loader
Returns a new instance of Loader.
10 11 12 |
# File 'lib/tone/configuration/loader.rb', line 10 def initialize path = Pathname("#{__dir__}/defaults.yml") @path = path end |
Instance Method Details
#call ⇒ Object
14 |
# File 'lib/tone/configuration/loader.rb', line 14 def call = YAML.safe_load_file path, symbolize_names: true, freeze: true |