### Home Classes Methods

### In Files

- lib/tmail/address.rb

### Parent

Object

### Methods

- ::new
- #==
- #[]
- #accept
- #add
- #address_group?
- #delete
- #each
- #each_address
- #empty?
- #eql?
- #flatten
- #hash
- #include?
- #push
- #size
- #to_a
- #to_ary

### Included Modules

- StrategyInterface

### Files

- CHANGES
- LICENSE
- NOTES
- README
- Rakefile
- MANIFEST
- Makefile
- depend
- Makefile
- COPYING
- README

### Class/Module Index

Quicksearch

- TMail
- TMail::Address
- TMail::AddressGroup
- TMail::AddressHeader
- TMail::Attachment
- TMail::ContentDispositionHeader
- TMail::ContentTransferEncodingHeader
- TMail::ContentTypeHeader
- TMail::DateTimeHeader
- TMail::EncryptedHeader
- TMail::FilePort
- TMail::HeaderField
- TMail::KeywordsHeader
- TMail::Mail
- TMail::MailFlags
- TMail::Maildir
- TMail::MaildirLoader
- TMail::MaildirPort
- TMail::MboxLoader
- TMail::MessageIdHeader
- TMail::MhLoader
- TMail::MhMailbox
- TMail::MhPort
- TMail::MimeVersionHeader
- TMail::Parser
- TMail::Port
- TMail::ReceivedHeader
- TMail::ReferencesHeader
- TMail::ReturnPathHeader
- TMail::SingleAddressHeader
- TMail::StringPort
- TMail::StructuredHeader
- TMail::SyntaxError
- TMail::TMailScanner
- TMail::TextUtils
- TMail::UNIXMbox
- TMail::UnstructuredHeader
- CharDet
- CharDet::Big5DistributionAnalysis
- CharDet::Big5Prober
- CharDet::CharDistributionAnalysis
- CharDet::CharSetGroupProber
- CharDet::CharSetProber
- CharDet::CodingStateMachine
- CharDet::EUCJPContextAnalysis
- CharDet::EUCJPDistributionAnalysis
- CharDet::EUCJPProber
- CharDet::EUCKRDistributionAnalysis
- CharDet::EUCKRProber
- CharDet::EUCTWDistributionAnalysis
- CharDet::EUCTWProber
- CharDet::EscCharSetProber
- CharDet::GB2312DistributionAnalysis
- CharDet::GB2312Prober
- CharDet::HebrewProber
- CharDet::JapaneseContextAnalysis
- CharDet::Latin1Prober
- CharDet::MBCSGroupProber
- CharDet::MultiByteCharSetProber
- CharDet::SBCSGroupProber
- CharDet::SJISContextAnalysis
- CharDet::SJISDistributionAnalysis
- CharDet::SJISProber
- CharDet::SingleByteCharSetProber
- CharDet::UTF8Prober
- CharDet::UniversalDetector

No matching classes.

# TMail::AddressGroup

### Attributes

name[R]

### Public Class Methods

new( name, addrs ) click to toggle source

    # File lib/tmail/address.rb, line 301
    def initialize( name, addrs )
      @name = name
      @addresses = addrs
    end

### Public Instance Methods

==( other ) click to toggle source

    # File lib/tmail/address.rb, line 308
    def ==( other )
      other.respond_to? :to_a and @addresses == other.to_a
    end

Also aliased as: eql?
[]( idx ) click to toggle source

    # File lib/tmail/address.rb, line 318
    def []( idx )
      @addresses[idx]
    end

accept( strategy, dummy1 = nil, dummy2 = nil ) click to toggle source

    # File lib/tmail/address.rb, line 372
    def accept( strategy, dummy1 = nil, dummy2 = nil )
      strategy.phrase @name
      strategy.meta ':'
      strategy.space
      first = true
      each do |mbox|
        if first
          first = false
        else
          strategy.puts_meta ','
        end
        strategy.space
        mbox.accept strategy
      end
      strategy.meta ';'
      strategy.lwsp ''
    end

add( a ) click to toggle source

    # File lib/tmail/address.rb, line 360
    def add( a )
      @addresses.push a
    end

Also aliased as: push
address_group?() click to toggle source

    # File lib/tmail/address.rb, line 297
    def address_group?
      true
    end

delete( a ) click to toggle source

    # File lib/tmail/address.rb, line 366
    def delete( a )
      @addresses.delete a
    end

each( &block ) click to toggle source

    # File lib/tmail/address.rb, line 330
    def each( &block )
      @addresses.each(&block)
    end

each_address( &block ) click to toggle source

    # File lib/tmail/address.rb, line 356
    def each_address( &block )
      flatten.each(&block)
    end

empty?() click to toggle source

    # File lib/tmail/address.rb, line 326
    def empty?
      @addresses.empty?
    end

eql?( other ) click to toggle source
Alias for: ==
flatten() click to toggle source

    # File lib/tmail/address.rb, line 344
    def flatten
      set = []
      @addresses.each do |a|
        if a.respond_to? :flatten
          set.concat a.flatten
        else
          set.push a
        end
      end
      set
    end

hash() click to toggle source

    # File lib/tmail/address.rb, line 314
    def hash
      map {|i| i.hash }.hash
    end

include?( a ) click to toggle source

    # File lib/tmail/address.rb, line 340
    def include?( a )
      @addresses.include? a
    end

push( a ) click to toggle source
Alias for: add
size() click to toggle source

    # File lib/tmail/address.rb, line 322
    def size
      @addresses.size
    end

to_a() click to toggle source

    # File lib/tmail/address.rb, line 334
    def to_a
      @addresses.dup
    end

Also aliased as: to_ary
to_ary() click to toggle source
Alias for: to_a

[Validate]

Generated with the Darkfish Rdoc Generator 2.