Class: Wampproto::Message::Registered

Inherits:
Base
  • Object
show all
Defined in:
lib/wampproto/message/registered.rb

Overview

publish message

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

type, #type

Constructor Details

#initialize(request_id, registration_id) ⇒ Registered

Returns a new instance of Registered.



9
10
11
12
13
# File 'lib/wampproto/message/registered.rb', line 9

def initialize(request_id, registration_id)
  super()
  @request_id = Validate.int!("Request Id", request_id)
  @registration_id = Validate.int!("Registration Id", registration_id)
end

Instance Attribute Details

#registration_idObject (readonly)

Returns the value of attribute registration_id.



7
8
9
# File 'lib/wampproto/message/registered.rb', line 7

def registration_id
  @registration_id
end

#request_idObject (readonly)

Returns the value of attribute request_id.



7
8
9
# File 'lib/wampproto/message/registered.rb', line 7

def request_id
  @request_id
end

Class Method Details

.parse(wamp_message) ⇒ Object



19
20
21
22
# File 'lib/wampproto/message/registered.rb', line 19

def self.parse(wamp_message)
  _type, request_id, registration_id = wamp_message
  new(request_id, registration_id)
end

Instance Method Details

#marshalObject



15
16
17
# File 'lib/wampproto/message/registered.rb', line 15

def marshal
  [Type::REGISTERED, request_id, registration_id]
end