Class: MediaTypes::Serialization::SerializationBaseRegistration

Inherits:
Object
  • Object
show all
Defined in:
lib/media_types/serialization/serialization_registration.rb

Overview

A registration in a SerializationRegistration collection

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(serializer, inout, validator, display_identifier) ⇒ SerializationBaseRegistration

Returns a new instance of SerializationBaseRegistration.



126
127
128
129
130
131
# File 'lib/media_types/serialization/serialization_registration.rb', line 126

def initialize(serializer, inout, validator, display_identifier)
  self.serializer = serializer
  self.inout = inout
  self.validator = validator
  self.display_identifier = display_identifier
end

Instance Attribute Details

#display_identifierObject

Returns the value of attribute display_identifier.



144
145
146
# File 'lib/media_types/serialization/serialization_registration.rb', line 144

def display_identifier
  @display_identifier
end

#inoutObject

Returns the value of attribute inout.



144
145
146
# File 'lib/media_types/serialization/serialization_registration.rb', line 144

def inout
  @inout
end

#serializerObject

Returns the value of attribute serializer.



144
145
146
# File 'lib/media_types/serialization/serialization_registration.rb', line 144

def serializer
  @serializer
end

#validatorObject

Returns the value of attribute validator.



144
145
146
# File 'lib/media_types/serialization/serialization_registration.rb', line 144

def validator
  @validator
end

Instance Method Details

#call(_victim, _context, dsl: nil, raw: nil) ⇒ Object



140
141
142
# File 'lib/media_types/serialization/serialization_registration.rb', line 140

def call(_victim, _context, dsl: nil, raw: nil)
  raise 'Assertion failed, call function called on base registration.'
end

#decode(_victim, _context) ⇒ Object



137
138
139
# File 'lib/media_types/serialization/serialization_registration.rb', line 137

def decode(_victim, _context)
  raise 'Assertion failed, decode function called on base registration.'
end

#merge(_other) ⇒ Object



133
134
135
# File 'lib/media_types/serialization/serialization_registration.rb', line 133

def merge(_other)
  nil
end