# class Mail::KeywordsField

### Constants

CAPITALIZED_FIELD
FIELD_NAME

### Public Class Methods

new(value = nil, charset = 'utf-8') click to toggle source
Calls superclass method

    # File lib/mail/fields/keywords_field.rb, line 9
    def initialize(value = nil, charset = 'utf-8')
      self.charset = charset
      super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, value), charset)
      self
    end

### Public Instance Methods

decoded() click to toggle source

    # File lib/mail/fields/keywords_field.rb, line 33
    def decoded
      keywords.join(', ')
    end

default() click to toggle source

    # File lib/mail/fields/keywords_field.rb, line 37
    def default
      keywords
    end

encoded() click to toggle source

    # File lib/mail/fields/keywords_field.rb, line 29
    def encoded
      "#{CAPITALIZED_FIELD}: #{keywords.join(",\r\n ")}\r\n"
    end

keywords() click to toggle source

    # File lib/mail/fields/keywords_field.rb, line 25
    def keywords
      phrase_list.phrases
    end

parse(val = value) click to toggle source

    # File lib/mail/fields/keywords_field.rb, line 15
    def parse(val = value)
      unless Utilities.blank?(val)
        @phrase_list ||= PhraseList.new(value)
      end
    end

phrase_list() click to toggle source

    # File lib/mail/fields/keywords_field.rb, line 21
    def phrase_list
      @phrase_list ||= PhraseList.new(value)
    end