Class: Wampproto::Message::Challenge
- Defined in:
- lib/wampproto/message/challenge.rb
Overview
Wamp Challenge message
Instance Attribute Summary collapse
-
#auth_method ⇒ Object
readonly
Returns the value of attribute auth_method.
-
#extra ⇒ Object
readonly
Returns the value of attribute extra.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auth_method, extra = {}) ⇒ Challenge
constructor
A new instance of Challenge.
- #marshal ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(auth_method, extra = {}) ⇒ Challenge
Returns a new instance of Challenge.
9 10 11 12 13 |
# File 'lib/wampproto/message/challenge.rb', line 9 def initialize(auth_method, extra = {}) super() @auth_method = Validate.string!("AuthMethod", auth_method) @extra = Validate.hash!("Extra", extra) end |
Instance Attribute Details
#auth_method ⇒ Object (readonly)
Returns the value of attribute auth_method.
7 8 9 |
# File 'lib/wampproto/message/challenge.rb', line 7 def auth_method @auth_method end |
#extra ⇒ Object (readonly)
Returns the value of attribute extra.
7 8 9 |
# File 'lib/wampproto/message/challenge.rb', line 7 def extra @extra end |
Class Method Details
.parse(wamp_message) ⇒ Object
19 20 21 22 |
# File 'lib/wampproto/message/challenge.rb', line 19 def self.parse() _type, auth_method, extra = new(auth_method, extra) end |
Instance Method Details
#marshal ⇒ Object
15 16 17 |
# File 'lib/wampproto/message/challenge.rb', line 15 def marshal [Type::CHALLENGE, auth_method, extra] end |