Flowdock
method

match?

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: Route
match?(inbound_email) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionmailbox/lib/action_mailbox/router/route.rb, line 16
    def match?(inbound_email)
      case address
      when :all
        true
      when String
        inbound_email.mail.recipients.any? { |recipient| address.casecmp?(recipient) }
      when Regexp
        inbound_email.mail.recipients.any? { |recipient| address.match?(recipient) }
      when Proc
        address.call(inbound_email)
      else
        address.match?(inbound_email)
      end
    end
Register or log in to add new notes.