Class: EasyYAML::YAMLLoader

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

Instance Method Summary collapse

Constructor Details

#initialize(path, allow_aliases: true, allow_erb: true, relative_to_rails_root: true) ⇒ YAMLLoader

Returns a new instance of YAMLLoader.



7
8
9
10
11
12
# File 'lib/easy_yaml/yaml_loader.rb', line 7

def initialize path, allow_aliases: true, allow_erb: true, relative_to_rails_root: true
  @path                   = path
  @allow_aliases          = allow_aliases
  @allow_erb              = allow_erb
  @relative_to_rails_root = relative_to_rails_root
end

Instance Method Details

#to_hObject



14
15
16
# File 'lib/easy_yaml/yaml_loader.rb', line 14

def to_h
  safe_load
end