Class: Wampproto::Message::Subscribe
- Defined in:
- lib/wampproto/message/subscribe.rb
Overview
abort message
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#topic ⇒ Object
readonly
Returns the value of attribute topic.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(request_id, options, topic) ⇒ Subscribe
constructor
A new instance of Subscribe.
- #marshal ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(request_id, options, topic) ⇒ Subscribe
Returns a new instance of Subscribe.
9 10 11 12 13 14 |
# File 'lib/wampproto/message/subscribe.rb', line 9 def initialize(request_id, , topic) super() @request_id = Validate.int!("Request Id", request_id) = Validate.hash!("Options", ) @topic = Validate.string!("Topic", topic) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/wampproto/message/subscribe.rb', line 7 def end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
7 8 9 |
# File 'lib/wampproto/message/subscribe.rb', line 7 def request_id @request_id end |
#topic ⇒ Object (readonly)
Returns the value of attribute topic.
7 8 9 |
# File 'lib/wampproto/message/subscribe.rb', line 7 def topic @topic end |
Class Method Details
.parse(wamp_message) ⇒ Object
20 21 22 23 |
# File 'lib/wampproto/message/subscribe.rb', line 20 def self.parse() _type, request_id, , topic = new(request_id, , topic) end |
Instance Method Details
#marshal ⇒ Object
16 17 18 |
# File 'lib/wampproto/message/subscribe.rb', line 16 def marshal [Type::SUBSCRIBE, request_id, , topic] end |