Class: Mailman::Route::ToCondition

Inherits:
Condition
  • Object
show all
Defined in:
lib/mailman/route/conditions.rb

Overview

Matches against the To addresses of a message.

Instance Attribute Summary

Attributes inherited from Condition

#matcher

Instance Method Summary collapse

Methods inherited from Condition

inherited, #initialize

Constructor Details

This class inherits a constructor from Mailman::Route::Condition

Instance Method Details

#match(message) ⇒ Object


6
7
8
9
10
11
12
13
14
15
# File 'lib/mailman/route/conditions.rb', line 6

def match(message)
  if !message.to.nil?
    message.to.each do |address|
      if result = @matcher.match(address)
        return result
      end
    end
  end
  nil
end