Sha256: 00d1d2d73773d6547fb908f98fd7a797f0495231e69315a29471bc36ad46359d

Contents?: true

Size: 1.15 KB

Versions: 16

Compression:

Stored size: 1.15 KB

Contents

# Autogenerated from a Treetop grammar. Edits may be lost.


module Mail
  module AddressLists
    include Treetop::Runtime

    def root
      @root ||= :primary_address
    end

    include RFC2822

    module PrimaryAddress0
      def addresses
        [first_addr] + other_addr.elements.map { |o| o.addr_value }
      end
    end

    module PrimaryAddress1
      def addresses
        [first_addr] + other_addr.elements.map { |o| o.addr_value }
      end
    end

    def _nt_primary_address
      start_index = index
      if node_cache[:primary_address].has_key?(index)
        cached = node_cache[:primary_address][index]
        @index = cached.interval.end if cached
        return cached
      end

      i0 = index
      r1 = _nt_address_list
      r1.extend(PrimaryAddress0)
      if r1
        r0 = r1
      else
        r2 = _nt_obs_addr_list
        r2.extend(PrimaryAddress1)
        if r2
          r0 = r2
        else
          @index = i0
          r0 = nil
        end
      end

      node_cache[:primary_address][start_index] = r0

      r0
    end

  end

  class AddressListsParser < Treetop::Runtime::CompiledParser
    include AddressLists
  end

end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
mail-2.1.3 lib/mail/parsers/address_lists.rb
kbaum-mail-2.1.2.1 lib/mail/parsers/address_lists.rb
mail-2.1.2 lib/mail/parsers/address_lists.rb
mail-2.1.1 lib/mail/parsers/address_lists.rb
mail-2.1.0 lib/mail/parsers/address_lists.rb
mail-2.0.5 lib/mail/parsers/address_lists.rb
mail-2.0.3 lib/mail/parsers/address_lists.rb
mail-1.6.0 lib/mail/parsers/address_lists.rb
mail-1.5.4 lib/mail/parsers/address_lists.rb
mail-1.5.3 lib/mail/parsers/address_lists.rb
mail-1.5.2 lib/mail/parsers/address_lists.rb
mail-1.5.1 lib/mail/parsers/address_lists.rb
mail-1.5.0 lib/mail/parsers/address_lists.rb
mail-1.4.3 lib/mail/parsers/address_lists.rb
mail-1.4.2 lib/mail/parsers/address_lists.rb
mail-1.4.1 lib/mail/parsers/address_lists.rb