Class: FoodsoftMailReceiver

Inherits:
MidiSmtpServer::Smtpd
  • Object
show all
Defined in:
lib/foodsoft_mail_receiver.rb

Constant Summary collapse

@@registered_classes =
Set.new

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.received(recipient, data) ⇒ Object


12
13
14
# File 'lib/foodsoft_mail_receiver.rb', line 12

def self.received(recipient, data)
  find_handler(recipient).call(data)
end

.register(klass) ⇒ Object


8
9
10
# File 'lib/foodsoft_mail_receiver.rb', line 8

def self.register(klass)
  @@registered_classes.add klass
end

Instance Method Details

#startObject


16
17
18
19
# File 'lib/foodsoft_mail_receiver.rb', line 16

def start
  super
  @handlers = []
end