Class: Cassandra::Protocol::V3::Decoder
- Inherits:
-
Object
- Object
- Cassandra::Protocol::V3::Decoder
- Defined in:
- lib/cassandra/protocol/v3.rb
Instance Method Summary collapse
- #<<(data) ⇒ Object
-
#initialize(handler, compressor = nil) ⇒ Decoder
constructor
A new instance of Decoder.
Constructor Details
#initialize(handler, compressor = nil) ⇒ Decoder
Returns a new instance of Decoder.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/cassandra/protocol/v3.rb', line 52 def initialize(handler, compressor = nil) @handler = handler @compressor = compressor @state = :initial @header = nil @version = nil @code = nil @length = nil @buffer = CqlByteBuffer.new end |
Instance Method Details
#<<(data) ⇒ Object
63 64 65 66 67 |
# File 'lib/cassandra/protocol/v3.rb', line 63 def <<(data) @buffer << data __send__(:"decode_#{@state}", @buffer) end |