1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
class ActionMailroom::Mailbox class << self def receive(inbound_email) new(inbound_email).process end def routing(routes) @router = ActionMailroom::Router.new(routes) end end attr_reader :inbound_email delegate :mail, to: :inbound_email def initialize(inbound_email) @inbound_email = inbound_email end def process end end