Class: Cql::Protocol::ResponseFrame::FrameBody

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, length, type) ⇒ FrameBody

Returns a new instance of FrameBody.



99
100
101
102
103
104
# File 'lib/cql/protocol/response_frame.rb', line 99

def initialize(buffer, length, type)
  @buffer = buffer
  @length = length
  @type = type
  check_complete!
end

Instance Attribute Details

#bufferObject (readonly)

Returns the value of attribute buffer.



97
98
99
# File 'lib/cql/protocol/response_frame.rb', line 97

def buffer
  @buffer
end

#responseObject (readonly)

Returns the value of attribute response.



97
98
99
# File 'lib/cql/protocol/response_frame.rb', line 97

def response
  @response
end

Instance Method Details

#<<(str) ⇒ Object



106
107
108
109
# File 'lib/cql/protocol/response_frame.rb', line 106

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

#complete?Boolean

Returns:

  • (Boolean)


111
112
113
# File 'lib/cql/protocol/response_frame.rb', line 111

def complete?
  !!@response
end