Class: Twitch::Bot::ModeCommandParser
- Inherits:
-
CommandParser
- Object
- CommandParser
- Twitch::Bot::ModeCommandParser
- Defined in:
- lib/twitch/bot/message_parser.rb
Overview
Parses a MODE IRC command
Constant Summary collapse
- MODE_CHANGE =
{ "-o" => :remove_moderator, "+o" => :add_moderator, }.freeze
Instance Attribute Summary
Attributes inherited from CommandParser
Instance Method Summary collapse
Methods inherited from CommandParser
Constructor Details
This class inherits a constructor from Twitch::Bot::CommandParser
Instance Method Details
#call ⇒ Object
80 81 82 83 |
# File 'lib/twitch/bot/message_parser.rb', line 80 def call params = .params Message::Mode.new(user: params.last, mode: MODE_CHANGE[params[1]]) end |