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.
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
#command ⇒ Object (readonly)
Returns the value of attribute command.
41 42 43 |
# File 'lib/dorothy2/DEM.rb', line 41 def command @command end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
42 43 44 |
# File 'lib/dorothy2/DEM.rb', line 42 def content @content end |