Class: RocketChat::Realtime::Handlers::Base
- Inherits:
-
Object
- Object
- RocketChat::Realtime::Handlers::Base
- Extended by:
- Forwardable
- Defined in:
- lib/rocket_chat/realtime/handlers/base.rb
Overview
Base Message Handler
Instance Attribute Summary collapse
- #dispatcher ⇒ Object readonly
- #message ⇒ Object readonly
Class Method Summary collapse
-
.call(dispatcher, message) ⇒ Object
Dispatch message.
Instance Method Summary collapse
-
#initialize(dispatcher, message) ⇒ Base
constructor
A new instance of Base.
-
#process ⇒ Object
Process message.
Constructor Details
#initialize(dispatcher, message) ⇒ Base
Returns a new instance of Base.
38 39 40 41 |
# File 'lib/rocket_chat/realtime/handlers/base.rb', line 38 def initialize(dispatcher, ) @dispatcher = dispatcher @message = end |
Instance Attribute Details
#dispatcher ⇒ Object (readonly)
29 30 31 |
# File 'lib/rocket_chat/realtime/handlers/base.rb', line 29 def dispatcher @dispatcher end |
#message ⇒ Object (readonly)
29 30 31 |
# File 'lib/rocket_chat/realtime/handlers/base.rb', line 29 def @message end |
Class Method Details
.call(dispatcher, message) ⇒ Object
Dispatch message
21 22 23 |
# File 'lib/rocket_chat/realtime/handlers/base.rb', line 21 def call(dispatcher, ) new(dispatcher, ).process end |
Instance Method Details
#process ⇒ Object
Process message
46 47 48 |
# File 'lib/rocket_chat/realtime/handlers/base.rb', line 46 def process raise NotImplementedError end |