Class: Cql::Protocol::ResponseFrame::FrameHeaders

Inherits:
Object
  • Object
show all
Defined in:
lib/cql/protocol/response_frame.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(buffer) ⇒ FrameHeaders

Returns a new instance of FrameHeaders.



67
68
69
70
# File 'lib/cql/protocol/response_frame.rb', line 67

def initialize(buffer)
  @buffer = buffer
  check_complete!
end

Instance Attribute Details

#bufferObject (readonly)

Returns the value of attribute buffer.



65
66
67
# File 'lib/cql/protocol/response_frame.rb', line 65

def buffer
  @buffer
end

#lengthObject (readonly)

Returns the value of attribute length.



65
66
67
# File 'lib/cql/protocol/response_frame.rb', line 65

def length
  @length
end

#opcodeObject (readonly)

Returns the value of attribute opcode.



65
66
67
# File 'lib/cql/protocol/response_frame.rb', line 65

def opcode
  @opcode
end

#protocol_versionObject (readonly)

Returns the value of attribute protocol_version.



65
66
67
# File 'lib/cql/protocol/response_frame.rb', line 65

def protocol_version
  @protocol_version
end

#stream_idObject (readonly)

Returns the value of attribute stream_id.



65
66
67
# File 'lib/cql/protocol/response_frame.rb', line 65

def stream_id
  @stream_id
end

Instance Method Details

#<<(str) ⇒ Object



72
73
74
75
# File 'lib/cql/protocol/response_frame.rb', line 72

def <<(str)
  @buffer << str
  check_complete!
end

#complete?Boolean

Returns:

  • (Boolean)


77
78
79
# File 'lib/cql/protocol/response_frame.rb', line 77

def complete?
  !!@protocol_version
end