Class: FoodsoftMailReceiver

Inherits:
MidiSmtpServer::Smtpd
  • Object
show all
Defined in:
app/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



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

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

.register(klass) ⇒ Object



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

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

Instance Method Details

#startObject



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

def start
  super
  @handlers = []
end