Class: Wampproto::Message::Register

Inherits:
Base
  • Object
show all
Defined in:
lib/wampproto/message/register.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, options, procedure) ⇒ Register

Returns a new instance of Register.



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

def initialize(request_id, options, procedure)
  super()
  @request_id = Validate.int!("Request Id", request_id)
  @options    = Validate.hash!("Options", options)
  @procedure  = Validate.string!("Procedure", procedure)
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

#procedureObject (readonly)

Returns the value of attribute procedure.



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

def procedure
  @procedure
end

#request_idObject (readonly)

Returns the value of attribute request_id.



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

def request_id
  @request_id
end

Class Method Details

.parse(wamp_message) ⇒ Object



20
21
22
23
# File 'lib/wampproto/message/register.rb', line 20

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

Instance Method Details

#marshalObject



16
17
18
# File 'lib/wampproto/message/register.rb', line 16

def marshal
  [Type::REGISTER, request_id, options, procedure]
end