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