Class: A9n::YamlLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/a9n/yaml_loader.rb

Class Method Summary collapse

Class Method Details

.load(file_path) ⇒ Object



3
4
5
6
# File 'lib/a9n/yaml_loader.rb', line 3

def self.load(file_path)
  kwargs = RUBY_VERSION >= '3.1.0' ? { aliases: true } : {}
  YAML.load(ERB.new(File.read(file_path)).result, **kwargs)
end