lib/roda/plugins/mail_processor.rb
def process_mail(&block)
          if string_routes = opts[:mail_processor_string_routes]
            addresses = mail_recipients

            addresses.each do |address|
              if meth = string_routes[address.to_s.downcase]
                _roda_handle_route{send(meth, @_request)}
                return
              end
            end

            opts[:mail_processor_regexp_routes].each do |regexp, meth|
              addresses.each do |address|
                if md = regexp.match(address)
                  _roda_handle_route{send(meth, @_request, *md.captures)}
                  return 
                end
              end
            end
          end

          _roda_handle_main_route

          nil
        end
# Perform the processing of mail for this request, first considering
# routes defined via the the class-level +rcpt+ method, and then the
# normal routing tree passed in as the block.
Perform the processing of mail for this request, first considering
routes defined via the the class-level +rcpt+ method, and then the
normal routing tree passed in as the block.
Perform the processing of mail for this request first considering routes defined via the the class - level + rcpt + method and then the normal routing tree passed in as the block .
def process_mail(&block)
          if string_routes = opts[:mail_processor_string_routes]
            addresses = mail_recipients
            addresses.each do |address|
              if meth = string_routes[address.to_s.downcase]
                _roda_handle_route{send(meth, @_request)}
                return
              end
            end
            opts[:mail_processor_regexp_routes].each do |regexp, meth|
              addresses.each do |address|
                if md = regexp.match(address)
                  _roda_handle_route{send(meth, @_request, *md.captures)}
                  return 
                end
              end
            end
          end
          _roda_handle_main_route
          nil
        end
def process_mail ( & block ) if string_routes = opts [ :mail_processor_string_routes ] addresses = mail_recipients addresses . each do | address | if meth = string_routes [ address . to_s . downcase ] _roda_handle_route { send ( meth , @_request ) } return end end opts [ :mail_processor_regexp_routes ] . each do | regexp , meth | addresses . each do | address | if md = regexp . match ( address ) _roda_handle_route { send ( meth , @_request , * md . captures ) } return end end end end _roda_handle_main_route nil end
Perform the processing of mail for this request, first considering
routes defined via the the class-level +rcpt+ method, and then the
normal routing tree passed in as the block.
Perform the processing of mail for this request first considering routes defined via the the class - level + rcpt + method and then the normal routing tree passed in as the block .
block