class Twitch::Bot::IrcMessageParams
This class parses the params portion of an IRC message.
Attributes
params[R]
raw_params[R]
Public Class Methods
new(raw_params)
click to toggle source
# File lib/twitch/bot/irc_message.rb, line 74 def initialize(raw_params) @raw_params = raw_params.strip @params = parse end
Private Instance Methods
parse()
click to toggle source
# File lib/twitch/bot/irc_message.rb, line 83 def parse if (match = raw_params.match(/(?:^:| :)(.*)$/)) params = match.pre_match.split(" ") params << match[1] else raw_params.split(" ") end end