Action Mailbox Router
Encapsulates the routes that live on the ApplicationMailbox and performs the actual routing when an inbound_email is received.
Namespace
Methods
- A
- M
- N
- R
Class Public methods
new() Link
Source: show
# File actionmailbox/lib/action_mailbox/router.rb, line 11 def initialize @routes = [] end
Instance Public methods
add_route(address, to:) Link
Source: show
# File actionmailbox/lib/action_mailbox/router.rb, line 21 def add_route(address, to:) routes.append Route.new(address, to: to) end
add_routes(routes) Link
Source: show
# File actionmailbox/lib/action_mailbox/router.rb, line 15 def add_routes(routes) routes.each do |(address, mailbox_name)| add_route address, to: mailbox_name end end