Class: JSONAPI::CachedResponseFragment::Lookup
- Inherits:
-
Struct
- Object
- Struct
- JSONAPI::CachedResponseFragment::Lookup
- Defined in:
- lib/jsonapi/cached_response_fragment.rb
Instance Attribute Summary collapse
-
#cache_ids ⇒ Object
Returns the value of attribute cache_ids.
-
#context ⇒ Object
Returns the value of attribute context.
-
#context_key ⇒ Object
Returns the value of attribute context_key.
-
#resource_klass ⇒ Object
Returns the value of attribute resource_klass.
-
#serializer_config_key ⇒ Object
Returns the value of attribute serializer_config_key.
Instance Method Summary collapse
Instance Attribute Details
#cache_ids ⇒ Object
Returns the value of attribute cache_ids
4 5 6 |
# File 'lib/jsonapi/cached_response_fragment.rb', line 4 def cache_ids @cache_ids end |
#context ⇒ Object
Returns the value of attribute context
4 5 6 |
# File 'lib/jsonapi/cached_response_fragment.rb', line 4 def context @context end |
#context_key ⇒ Object
Returns the value of attribute context_key
4 5 6 |
# File 'lib/jsonapi/cached_response_fragment.rb', line 4 def context_key @context_key end |
#resource_klass ⇒ Object
Returns the value of attribute resource_klass
4 5 6 |
# File 'lib/jsonapi/cached_response_fragment.rb', line 4 def resource_klass @resource_klass end |
#serializer_config_key ⇒ Object
Returns the value of attribute serializer_config_key
4 5 6 |
# File 'lib/jsonapi/cached_response_fragment.rb', line 4 def serializer_config_key @serializer_config_key end |
Instance Method Details
#keys ⇒ Object
10 11 12 13 14 |
# File 'lib/jsonapi/cached_response_fragment.rb', line 10 def keys cache_ids.map do |(id, cache_key)| [type, id, cache_key, serializer_config_key, context_key] end end |
#type ⇒ Object
6 7 8 |
# File 'lib/jsonapi/cached_response_fragment.rb', line 6 def type resource_klass._type end |