Module: Octo::Utils
- Defined in:
- lib/octocore-cassandra/utils.rb
Class Method Summary collapse
-
.deserialize(data) ⇒ Object
Deserialize a data.
-
.serialize(record) ⇒ Object
Serialize one record before adding it to the cache.
Class Method Details
.deserialize(data) ⇒ Object
Deserialize a data.
18 19 20 |
# File 'lib/octocore-cassandra/utils.rb', line 18 def deserialize(data) Marshal::load(data) end |
.serialize(record) ⇒ Object
Serialize one record before adding it to the cache. Creates a ruby byte
stream
12 13 14 |
# File 'lib/octocore-cassandra/utils.rb', line 12 def serialize(record) Marshal::dump(record).to_s end |