Class: RocketChat::Realtime::Messages::Method
- Inherits:
-
RocketChat::Realtime::Message
- Object
- RocketChat::Realtime::Message
- RocketChat::Realtime::Messages::Method
- Defined in:
- lib/rocket_chat/realtime/messages/method.rb
Overview
The method message
The DDP RPC method call
Instance Attribute Summary collapse
- #name ⇒ Object readonly
- #parameters ⇒ Object readonly
Attributes inherited from RocketChat::Realtime::Message
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(name, *parameters) ⇒ Method
constructor
A new instance of Method.
Methods inherited from RocketChat::Realtime::Message
Constructor Details
#initialize(name, *parameters) ⇒ Method
Returns a new instance of Method.
18 19 20 21 22 23 |
# File 'lib/rocket_chat/realtime/messages/method.rb', line 18 def initialize(name, *parameters) super('method') @name = name @parameters = parameters end |
Instance Attribute Details
#name ⇒ Object (readonly)
15 16 17 |
# File 'lib/rocket_chat/realtime/messages/method.rb', line 15 def name @name end |
#parameters ⇒ Object (readonly)
15 16 17 |
# File 'lib/rocket_chat/realtime/messages/method.rb', line 15 def parameters @parameters end |
Instance Method Details
#body ⇒ Object
28 29 30 31 32 33 |
# File 'lib/rocket_chat/realtime/messages/method.rb', line 28 def body { method: name, params: parameters } end |