public Method

Mail.each_destination( ) { |i| ... }

Yields a block of destination, yielding each as a string.

(from the destinations example)
mail.each_destination { |d| puts "#{d.class}: #{d}" }
String: mikel@lindsaar.net
String: t@t.com
String: bob@me.com

Source Code

# File action_mailer/vendor/tmail-1.2.2/tmail/interface.rb, line 1019
def each_destination( &block )
  destinations([]).each do |i|
    if Address === i
      yield i
    else
      i.each(&block)
    end
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.