Class: Wamp::Client::Message::Abort
- Defined in:
- lib/wamp/client/message.rb
Overview
Abort Sent by a Peer*to abort the opening of a WAMP session. No response is expected. Formats:
[ABORT, Details|dict, Reason|uri]
Instance Attribute Summary collapse
-
#details ⇒ Object
Returns the value of attribute details.
-
#reason ⇒ Object
Returns the value of attribute reason.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(details, reason) ⇒ Abort
constructor
A new instance of Abort.
- #payload ⇒ Object
- #to_s ⇒ Object
Methods included from Check
Constructor Details
#initialize(details, reason) ⇒ Abort
Returns a new instance of Abort.
148 149 150 151 152 153 154 155 156 |
# File 'lib/wamp/client/message.rb', line 148 def initialize(details, reason) self.class.check_dict('details', details) self.class.check_uri('reason', reason) self.details = details self.reason = reason end |
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details.
146 147 148 |
# File 'lib/wamp/client/message.rb', line 146 def details @details end |
#reason ⇒ Object
Returns the value of attribute reason.
146 147 148 |
# File 'lib/wamp/client/message.rb', line 146 def reason @reason end |
Class Method Details
.parse(params) ⇒ Object
162 163 164 165 166 167 168 169 170 |
# File 'lib/wamp/client/message.rb', line 162 def self.parse(params) self.check_gte('params list', 3, params.count) self.check_equal('message type', self.type, params[0]) params.shift self.new(*params) end |
Instance Method Details
#payload ⇒ Object
172 173 174 175 176 177 178 179 |
# File 'lib/wamp/client/message.rb', line 172 def payload payload = [self.class.type] payload.push(self.details) payload.push(self.reason) payload end |
#to_s ⇒ Object
181 182 183 |
# File 'lib/wamp/client/message.rb', line 181 def to_s 'ABORT > ' + self.payload.to_s end |