Class: RapidApi::SerializerAdapters::Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/rapid_api/serializer_adapters/abstract.rb

Direct Known Subclasses

AmsAdapter

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#klassObject

Returns the value of attribute klass.



5
6
7
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 5

def klass
  @klass
end

#root_keyObject

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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 12

def serialize(_member)
  raise NotImplementedError
end

#serialize_collection(_collection) ⇒ Object

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 16

def serialize_collection(_collection)
  raise NotImplementedError
end

#serialize_errors(errors) ⇒ Object

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/rapid_api/serializer_adapters/abstract.rb', line 20

def serialize_errors(errors)
  raise NotImplementedError
end