Class: ModSpox::Handlers::Bounce

Inherits:
Handler
  • Object
show all
Defined in:
lib/mod_spox/handlers/Bounce.rb

Instance Method Summary collapse

Methods inherited from Handler

#preprocess

Constructor Details

#initialize(handlers) ⇒ Bounce

Returns a new instance of Bounce.



5
6
7
# File 'lib/mod_spox/handlers/Bounce.rb', line 5

def initialize(handlers)
    handlers[RPL_BOUNCE] = self
end

Instance Method Details

#process(string) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/mod_spox/handlers/Bounce.rb', line 9

def process(string)
    orig = string.dup
    2.times{string.slice!(0..string.index(' '))}
    server = string.slice!(0..string.index(',')-1)
    string.slice!(0..string.index(' ',4))
    return Messages::Incoming::Bounce.new(orig, server, string)
end