Class: ReeJson::FromJson
- Inherits:
-
Object
- Object
- ReeJson::FromJson
- Includes:
- Ree::FnDSL
- Defined in:
- lib/ree_lib/packages/ree_json/package/ree_json/functions/from_json.rb
Constant Summary collapse
- ParseJsonError =
Class.new(StandardError)
Instance Method Summary collapse
Instance Method Details
#call(object, **opts) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/ree_lib/packages/ree_json/package/ree_json/functions/from_json.rb', line 20 def call(object, **opts) = DEFAULT_OPTIONS .merge(opts) Oj.load(object, ) rescue ArgumentError, EncodingError, TypeError raise ParseJsonError.new end |