class Mail::PhraseList - mail-2.5.4 Documentation

# class Mail::PhraseList

### Public Class Methods

new(string) click to toggle source

    # File lib/mail/elements/phrase_list.rb, line 6
    def initialize(string)
      parser = Mail::PhraseListsParser.new
      if tree = parser.parse(string)
        @phrases = tree.phrases
      else
        raise Mail::Field::ParseError.new(PhraseList, string, parser.failure_reason)
      end
    end

### Public Instance Methods

phrases() click to toggle source

    # File lib/mail/elements/phrase_list.rb, line 15
    def phrases
      @phrases.map { |p| unquote(p.text_value) }
    end