Module: Balotelli::Core::Utils
- Defined in:
- lib/balotelli/core/utils.rb
Constant Summary collapse
- NICK_REGEX =
/\A(\S+)!.*/.freeze
- PRIV_MSG_REGEX =
/\A:?(\S+) PRIVMSG (\S+) :?(.*)/.freeze
- JOIN_REGEX =
/\A:?(\S+) JOIN (\S+)/.freeze
Class Method Summary collapse
Class Method Details
.nick_from_user(str) ⇒ Object
10 11 12 |
# File 'lib/balotelli/core/utils.rb', line 10 def nick_from_user(str) str.match(NICK_REGEX)[1] end |
.table_regex(nick) ⇒ Object
14 15 16 |
# File 'lib/balotelli/core/utils.rb', line 14 def table_regex(nick) /\A:?(\S+) \d+ #{nick} \S (#\S+) :?(.*)/.freeze end |