Module: Qtrix::Matrix::Common
- Included in:
- Qtrix::Matrix, QueuePicker, Reader, RowBuilder
- Defined in:
- lib/qtrix/matrix/common.rb
Constant Summary collapse
- REDIS_KEY =
:matrix
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
7 8 9 |
# File 'lib/qtrix/matrix/common.rb', line 7 def self.included(base) base.send(:extend, self) end |
Instance Method Details
#pack(item) ⇒ Object
11 12 13 14 15 |
# File 'lib/qtrix/matrix/common.rb', line 11 def pack(item) # Marshal is fast but not human readable, might want to # go for json or yaml. This is fast at least. Marshal.dump(item) end |
#unpack(item) ⇒ Object
17 18 19 |
# File 'lib/qtrix/matrix/common.rb', line 17 def unpack(item) Marshal.restore(item) end |