Class: Tone::Configuration::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/tone/configuration/loader.rb

Overview

Loads the default configuration into memory as a frozen hash.

Instance Method Summary collapse

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

#callObject



14
# File 'lib/tone/configuration/loader.rb', line 14

def call = YAML.safe_load_file path, symbolize_names: true, freeze: true