Class: Cql::Protocol::RegisterRequest

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

Instance Attribute Summary collapse

Attributes inherited from Request

#opcode

Instance Method Summary collapse

Methods inherited from Request

change_stream_id, #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.



8
9
10
11
# File 'lib/cql/protocol/requests/register_request.rb', line 8

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

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



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

def events
  @events
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/cql/protocol/requests/register_request.rb', line 17

def to_s
  %(REGISTER #@events)
end

#write(io) ⇒ Object



13
14
15
# File 'lib/cql/protocol/requests/register_request.rb', line 13

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