Class: Cql::Protocol::RegisterRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/cql/protocol/requests/register_request.rb

Instance Attribute Summary

Attributes inherited from Request

#opcode

Instance Method Summary collapse

Methods inherited from Request

#encode_frame

Methods included from Encoding

#write_bytes, #write_consistency, #write_decimal, #write_double, #write_float, #write_int, #write_long, #write_long_string, #write_short, #write_short_bytes, #write_string, #write_string_list, #write_string_map, #write_uuid, #write_varint

Constructor Details

#initialize(*events) ⇒ RegisterRequest

Returns a new instance of RegisterRequest.



6
7
8
9
# File 'lib/cql/protocol/requests/register_request.rb', line 6

def initialize(*events)
  super(11)
  @events = events
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/cql/protocol/requests/register_request.rb', line 15

def to_s
  %(REGISTER #@events)
end

#write(io) ⇒ Object



11
12
13
# File 'lib/cql/protocol/requests/register_request.rb', line 11

def write(io)
  write_string_list(io, @events)
end