Class: RLP::Sedes::Raw
- Inherits:
-
Object
- Object
- RLP::Sedes::Raw
- Defined in:
- lib/rlp/sedes/raw.rb
Overview
A sedes that does nothing. Thus, everything that can be directly encoded by RLP is serializable. This sedes can be used as a placeholder when deserializing larger structures.
Constant Summary
Constants included from Utils
Instance Method Summary collapse
Methods included from Utils
#big_endian_to_int, #bytes?, #bytes_to_str, #decode_hex, #encode_hex, #int_to_big_endian, #list?, make_immutable!, #primitive?, #str_to_bytes
Instance Method Details
#deserialize(serial) ⇒ Object
19 20 21 |
# File 'lib/rlp/sedes/raw.rb', line 19 def deserialize(serial) serial end |
#serialize(obj) ⇒ Object
14 15 16 17 |
# File 'lib/rlp/sedes/raw.rb', line 14 def serialize(obj) raise SerializationError.new("Can only serialize nested lists of strings", obj) unless serializable?(obj) obj end |