lib/qonfig/loaders/json.rb in qonfig-0.10.0 vs lib/qonfig/loaders/json.rb in qonfig-0.11.0
- old
+ new
@@ -1,31 +1,24 @@
# frozen_string_literal: true
-module Qonfig
- module Loaders
+# @api private
+# @since 0.5.0
+class Qonfig::Loaders::JSON < Qonfig::Loaders::Basic
+ class << self
+ # @param data [String]
+ # @return [Object]
+ #
# @api private
# @since 0.5.0
- module JSON
- # @since 0.5.0
- extend Qonfig::Loaders::Basic
+ def load(data)
+ ::JSON.parse(data, max_nesting: false, allow_nan: true)
+ end
- class << self
- # @param data [String]
- # @return [Object]
- #
- # @api private
- # @since 0.5.0
- def load(data)
- ::JSON.parse(data, max_nesting: false, allow_nan: true)
- end
-
- # @return [Object]
- #
- # @api private
- # @since 0.5.0
- def load_empty_data
- load('{}')
- end
- end
+ # @return [Object]
+ #
+ # @api private
+ # @since 0.5.0
+ def load_empty_data
+ load('{}')
end
end
end