Class: DoroParser::Parser::IRC

Inherits:
Object
  • Object
show all
Defined in:
lib/dorothy2/DEM.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ IRC

Returns a new instance of IRC.



45
46
47
48
49
50
51
52
# File 'lib/dorothy2/DEM.rb', line 45

def initialize(data)
  if data =~ /(USER |USERHOST |PRIVMSG |PASS |NICK |JOIN |MODE |MSG )(.*)\n/
    @command = $1
    @content = $2.force_encoding('UTF-8').gsub(/"|'|\\/, "-")    #xcode bug ->>> ")
  end
  #return true if [email protected]?
  return self
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



41
42
43
# File 'lib/dorothy2/DEM.rb', line 41

def command
  @command
end

#contentObject (readonly)

Returns the value of attribute content.



42
43
44
# File 'lib/dorothy2/DEM.rb', line 42

def content
  @content
end