Class: SimpleJsonapi::Definition::Base Abstract
- Inherits:
-
Object
- Object
- SimpleJsonapi::Definition::Base
- Defined in:
- lib/simple_jsonapi/definition/base.rb
Overview
This class is abstract.
Defines how a portion of a rendered JSONAPI document is generated from a resource or error object. See README for more details.
Direct Known Subclasses
Attribute, Error, ErrorSource, Link, Meta, Relationship, Resource
Instance Method Summary collapse
-
#initialize(*_args, **options, &_block) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(*_args, **options, &_block) ⇒ Base
Returns a new instance of Base.
16 17 18 19 20 |
# File 'lib/simple_jsonapi/definition/base.rb', line 16 def initialize(*_args, **, &_block) @if_predicate = @unless_predicate = nil @if_predicate = wrap_in_proc([:if]) if .key?(:if) @unless_predicate = wrap_in_proc([:unless]) if .key?(:unless) end |