Class: RapidApi::SerializerAdapters::Abstract
- Inherits:
-
Object
- Object
- RapidApi::SerializerAdapters::Abstract
- Defined in:
- lib/rapid_api/serializer_adapters/abstract.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#root_key ⇒ Object
Returns the value of attribute root_key.
Instance Method Summary collapse
- #deserialize_attributes(params, root_key) ⇒ Object
- #deserialize_id(params, root_key) ⇒ Object
-
#initialize(klass, root_key) ⇒ Abstract
constructor
A new instance of Abstract.
- #serialize(_member) ⇒ Object
- #serialize_collection(_collection) ⇒ Object
- #serialize_errors(errors) ⇒ Object
Constructor Details
#initialize(klass, root_key) ⇒ Abstract
Returns a new instance of Abstract.
7 8 9 10 |
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 7 def initialize(klass, root_key) @klass = klass @root_key = root_key end |
Instance Attribute Details
#klass ⇒ Object
Returns the value of attribute klass.
5 6 7 |
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 5 def klass @klass end |
#root_key ⇒ Object
Returns the value of attribute root_key.
5 6 7 |
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 5 def root_key @root_key end |
Instance Method Details
#deserialize_attributes(params, root_key) ⇒ Object
24 25 26 |
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 24 def deserialize_attributes(params, root_key) raise NotImplementedError end |
#deserialize_id(params, root_key) ⇒ Object
28 29 30 |
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 28 def deserialize_id(params, root_key) raise NotImplementedError end |
#serialize(_member) ⇒ Object
12 13 14 |
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 12 def serialize(_member) raise NotImplementedError end |
#serialize_collection(_collection) ⇒ Object
16 17 18 |
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 16 def serialize_collection(_collection) raise NotImplementedError end |
#serialize_errors(errors) ⇒ Object
20 21 22 |
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 20 def serialize_errors(errors) raise NotImplementedError end |