Class: Qonfig::Loaders::JSON 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 |
# File 'lib/qonfig/loaders/json.rb', line 14 def load(data) ::JSON.parse(data, max_nesting: false, allow_nan: true) rescue ::JSON::ParserError => error raise(Qonfig::JSONLoaderParseError.new(error.).tap do |exception| exception.set_backtrace(error.backtrace) end) 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.
26 27 28 |
# File 'lib/qonfig/loaders/json.rb', line 26 def load_empty_data load('{}') end |