Class: Solace::SerializableRecord
- Inherits:
-
Object
- Object
- Solace::SerializableRecord
- Includes:
- Concerns::BinarySerializable
- Defined in:
- lib/solace/serializable_record.rb
Direct Known Subclasses
Class Method Summary collapse
-
.deserialize(io) ⇒ Solace::Instruction
Parse instruction from io stream.
Instance Method Summary collapse
-
#serialize ⇒ String
Serializes the transaction to a binary format.
Methods included from Concerns::BinarySerializable
Class Method Details
.deserialize(io) ⇒ Solace::Instruction
Parse instruction from io stream
11 12 13 14 15 |
# File 'lib/solace/serializable_record.rb', line 11 def self.deserialize(io) self::DESERIALIZER.call(io) rescue NameError => e raise "DESERIALIZER must be defined: #{e.}" end |
Instance Method Details
#serialize ⇒ String
Serializes the transaction to a binary format
20 21 22 23 24 |
# File 'lib/solace/serializable_record.rb', line 20 def serialize self.class::SERIALIZER.call(self) rescue NameError => e raise "SERIALIZER must be defined: #{e.}" end |