Class: Mailman::Route::FromCondition

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

Overview

Matches against the From 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


20
21
22
23
24
25
26
27
# File 'lib/mailman/route/conditions.rb', line 20

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