Sha256: 4b6b9213a17d9ac2b3aa4bd7ac6a850ac39c4eca89b9236533011d8993cacc4f

Contents?: true

Size: 461 Bytes

Versions: 130

Compression:

Stored size: 461 Bytes

Contents

# encoding: utf-8
module Mail
  class PhraseList
    
    include Mail::Utilities
    
    def initialize(string)
      parser = Mail::PhraseListsParser.new
      if tree = parser.parse(string)
        @phrases = tree.phrases
      else
        raise Mail::Field::ParseError, "PhraseList can not parse |#{string}|\nReason was: #{parser.failure_reason}\n"
      end
    end
    
    def phrases
      @phrases.map { |p| unquote(p.text_value) }
    end

  end
end

Version data entries

130 entries across 100 versions & 6 rubygems

Version Path
depengine-0.0.31 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.31 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.30 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.30 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.29 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.29 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.28 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.28 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.27 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.27 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.26 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.26 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.25 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.25 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.24 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.24 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.23 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.23 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.22 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb
depengine-0.0.22 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/elements/phrase_list.rb