Class: RocketChat::Realtime::Messages::Result
- Inherits:
-
RocketChat::Realtime::Message
- Object
- RocketChat::Realtime::Message
- RocketChat::Realtime::Messages::Result
- Defined in:
- lib/rocket_chat/realtime/messages/result.rb
Overview
The result message
The DDP RPC result message
Instance Attribute Summary collapse
- #result ⇒ Object readonly
Attributes inherited from RocketChat::Realtime::Message
Instance Method Summary collapse
-
#[](key) ⇒ Object
:nodoc:.
- #body ⇒ Object
-
#initialize(id, result) ⇒ Result
constructor
A new instance of Result.
Methods inherited from RocketChat::Realtime::Message
Constructor Details
#initialize(id, result) ⇒ Result
Returns a new instance of Result.
18 19 20 21 22 |
# File 'lib/rocket_chat/realtime/messages/result.rb', line 18 def initialize(id, result) super('result', id) @result = result end |
Instance Attribute Details
#result ⇒ Object (readonly)
15 16 17 |
# File 'lib/rocket_chat/realtime/messages/result.rb', line 15 def result @result end |
Instance Method Details
#[](key) ⇒ Object
:nodoc:
34 35 36 |
# File 'lib/rocket_chat/realtime/messages/result.rb', line 34 def [](key) result.fetch(key.to_s, nil) end |
#body ⇒ Object
27 28 29 30 31 |
# File 'lib/rocket_chat/realtime/messages/result.rb', line 27 def body { result: result } end |