Class: DoroParser::Parser::IRC
- Inherits:
-
Object
- Object
- DoroParser::Parser::IRC
- Defined in:
- lib/dorothy2/DEM.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
-
#initialize(data) ⇒ IRC
constructor
A new instance of IRC.
Constructor Details
#initialize(data) ⇒ IRC
Returns a new instance of IRC.
103 104 105 106 107 108 109 110 111 |
# File 'lib/dorothy2/DEM.rb', line 103 def initialize(data) if data =~ /(USER |USERHOST |PRIVMSG |PASS |NICK |JOIN |MODE |MSG )(.*)\n/ noutf = Iconv.new('US-ASCII//TRANSLIT', 'UTF-8') @command = $1 @content = noutf.iconv($2).gsub(/"|'|\\/, "-") #xcode bug ->>> ") end #return true if [email protected]? return self end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
99 100 101 |
# File 'lib/dorothy2/DEM.rb', line 99 def command @command end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
100 101 102 |
# File 'lib/dorothy2/DEM.rb', line 100 def content @content end |