Class: Qonfig::Loaders::YAML Private
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .load(data) ⇒ Object private
- .load_empty_data ⇒ Object private
Methods inherited from Basic
Class Method Details
.load(data) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/qonfig/loaders/yaml.rb', line 14 def load(data) ::YAML.load(ERB.new(data).result) rescue ::Psych::SyntaxError => error raise( Qonfig::YAMLLoaderParseError.new( error.file, error.line, error.column, error.offset, error.problem, error.context ).tap { |exception| exception.set_backtrace(error.backtrace) } ) end |
.load_empty_data ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 |
# File 'lib/qonfig/loaders/yaml.rb', line 33 def load_empty_data load('{}') end |