Class: Typed::Serializer
- Inherits:
-
Object
- Object
- Typed::Serializer
- Extended by:
- T::Generic, T::Helpers, T::Sig
- Defined in:
- lib/typed/serializer.rb
Direct Known Subclasses
Constant Summary collapse
- Input =
type_member
- Output =
type_member
- Params =
T.type_alias { T::Hash[Symbol, T.untyped] }
- DeserializeResult =
T.type_alias { Result[T::Struct, DeserializeError] }
Instance Attribute Summary collapse
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
- #deserialize(source) ⇒ Object
-
#initialize(schema:) ⇒ Serializer
constructor
A new instance of Serializer.
- #serialize(struct) ⇒ Object
Constructor Details
#initialize(schema:) ⇒ Serializer
Returns a new instance of Serializer.
19 20 21 |
# File 'lib/typed/serializer.rb', line 19 def initialize(schema:) @schema = schema end |
Instance Attribute Details
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
16 17 18 |
# File 'lib/typed/serializer.rb', line 16 def schema @schema end |
Instance Method Details
#deserialize(source) ⇒ Object
24 25 |
# File 'lib/typed/serializer.rb', line 24 def deserialize(source) end |
#serialize(struct) ⇒ Object
28 29 |
# File 'lib/typed/serializer.rb', line 28 def serialize(struct) end |