Class: MediaTypes::Serialization::SerializationBaseRegistration
- Inherits:
-
Object
- Object
- MediaTypes::Serialization::SerializationBaseRegistration
- Defined in:
- lib/media_types/serialization/serialization_registration.rb
Overview
A registration in a SerializationRegistration collection
Direct Known Subclasses
SerializationAliasRegistration, SerializationBlockRegistration
Instance Attribute Summary collapse
-
#display_identifier ⇒ Object
Returns the value of attribute display_identifier.
-
#inout ⇒ Object
Returns the value of attribute inout.
-
#serializer ⇒ Object
Returns the value of attribute serializer.
-
#validator ⇒ Object
Returns the value of attribute validator.
Instance Method Summary collapse
- #call(_victim, _context, dsl: nil, raw: nil) ⇒ Object
- #decode(_victim, _context) ⇒ Object
-
#initialize(serializer, inout, validator, display_identifier) ⇒ SerializationBaseRegistration
constructor
A new instance of SerializationBaseRegistration.
- #merge(_other) ⇒ Object
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_identifier ⇒ Object
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 |
#inout ⇒ Object
Returns the value of attribute inout.
144 145 146 |
# File 'lib/media_types/serialization/serialization_registration.rb', line 144 def inout @inout end |
#serializer ⇒ Object
Returns the value of attribute serializer.
144 145 146 |
# File 'lib/media_types/serialization/serialization_registration.rb', line 144 def serializer @serializer end |
#validator ⇒ Object
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 |