Class: DoroParser::Parser

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

Defined Under Namespace

Classes: IRC, SMTP

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#serviceObject (readonly)

Returns the value of attribute service.



80
81
82
# File 'lib/dorothy2/DEM.rb', line 80

def service
  @service
end

Class Method Details

.guess(a) ⇒ Object



82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/dorothy2/DEM.rb', line 82

def self.guess(a)

  if a =~ /USER |USERHOST |PRIVMSG |PASS |NICK |JOIN |MODE |MSG/ 
  t = IRC.new a 
  elsif a =~ /from(.*)From(.*)Subject/m
  t = SMTP.init a
  elsif a =~ /(\d*)(.*)\n/
  t = SMTP.new a
  end

  return t
end