Method: Qonfig::Loaders::TOML.load

Defined in:
lib/qonfig/plugins/toml/loaders/toml.rb

.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.

Parameters:

  • data (String)

Returns:

  • (Object)

Raises:

Since:

  • 0.12.0



14
15
16
17
18
19
20
# File 'lib/qonfig/plugins/toml/loaders/toml.rb', line 14

def load(data)
  ::TomlRB.parse(ERB.new(data).result)
rescue ::TomlRB::ParseError => error
  raise(Qonfig::TOMLLoaderParseError.new(error.message).tap do |exception|
    exception.set_backtrace(error.backtrace)
  end)
end