Module: Enumerable

Included in:
StringInput, TMail::AddressGroup
Defined in:
lib/action_mailer/vendor/tmail-1.2.7/tmail/compat.rb,
lib/action_mailer/vendor/tmail-1.2.7/tmail/compat.rb,
lib/action_mailer/vendor/tmail-1.2.7/tmail/compat.rb,
lib/action_mailer/vendor/tmail-1.2.7/tmail/compat.rb,
lib/action_mailer/vendor/tmail-1.2.7/tmail/mailbox.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#rejectObject



16
17
18
19
20
21
22
# File 'lib/action_mailer/vendor/tmail-1.2.7/tmail/compat.rb', line 16

def reject
  result = []
  each do |i|
    result.push i unless yield(i)
  end
  result
end

#sort_byObject



28
29
30
# File 'lib/action_mailer/vendor/tmail-1.2.7/tmail/compat.rb', line 28

def sort_by
  map {|i| [yield(i), i] }.sort.map {|val, i| i }
end