Class: JsonapiActions::InclusionMapper
- Inherits:
-
Object
- Object
- JsonapiActions::InclusionMapper
- Defined in:
- lib/jsonapi_actions/inclusion_mapper.rb
Instance Attribute Summary collapse
-
#map ⇒ Object
readonly
Returns the value of attribute map.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
-
#initialize(serializer, include: '*') ⇒ InclusionMapper
constructor
A new instance of InclusionMapper.
Constructor Details
#initialize(serializer, include: '*') ⇒ InclusionMapper
Returns a new instance of InclusionMapper.
5 6 7 8 9 10 |
# File 'lib/jsonapi_actions/inclusion_mapper.rb', line 5 def initialize(serializer, include: '*') @included = {} @recursive = include == '**' @root = serializer.record_type @map = include_relationships(serializer) end |
Instance Attribute Details
#map ⇒ Object (readonly)
Returns the value of attribute map.
3 4 5 |
# File 'lib/jsonapi_actions/inclusion_mapper.rb', line 3 def map @map end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
3 4 5 |
# File 'lib/jsonapi_actions/inclusion_mapper.rb', line 3 def root @root end |