class Pepito::Handlers::Room
Handler
to manage rooms options
Public Instance Methods
chat_set_topic(source, match_data)
click to toggle source
Set topic @param source [Pepito::Source] Where the message came from @param match_data [MatchData] Match data for the regexp pattern. @return [nil]
# 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()
click to toggle source
Run the handler. @return [void]
# 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