class MailHandler::Receiving::FileList::Filter::ByEmailRecipient

filter by email recipient

Public Class Methods

new(files, recipient) click to toggle source
# File lib/mailhandler/receiving/filelist/filter/email.rb, line 81
def initialize(files, recipient)
  super(files)
  @recipient = recipient
end

Private Instance Methods

meets_expectation?(file) click to toggle source
# File lib/mailhandler/receiving/filelist/filter/email.rb, line 88
def meets_expectation?(file)
  read_email_from_file(file)[@recipient.keys.first].to_s.include? @recipient.values.first
end