Class: Pepito::Handlers::Room
- Inherits:
-
Pepito::Handler
- Object
- Pepito::Handler
- Pepito::Handlers::Room
- Defined in:
- lib/pepito/handlers/room.rb
Overview
Handler to manage rooms options
Instance Attribute Summary
Attributes inherited from Pepito::Handler
Instance Method Summary collapse
-
#chat_set_topic(source, match_data) ⇒ nil
Set topic.
-
#run ⇒ void
Run the handler.
Methods inherited from Pepito::Handler
Methods included from Pepito::Handler::ChatRouter
Methods included from Pepito::Handler::HTTPRouter
Constructor Details
This class inherits a constructor from Pepito::Handler
Instance Method Details
#chat_set_topic(source, match_data) ⇒ nil
Set topic
17 18 19 20 |
# File 'lib/pepito/handlers/room.rb', line 17 def chat_set_topic(source, match_data) source.adapter.topic(source, match_data['topic']) nil end |
#run ⇒ void
This method returns an undefined value.
Run the handler.
9 10 11 |
# File 'lib/pepito/handlers/room.rb', line 9 def run chat_route(/^set topic (?<topic>.*)$/i, :chat_set_topic, command: true, help: "set topic [topic] -> change the channel's topic") end |