Class: Mail::KeywordsField

Inherits:
NamedStructuredField show all
Defined in:
lib/mail/fields/keywords_field.rb

Overview

keywords = “Keywords:” phrase *(“,” phrase) CRLF

Constant Summary collapse

NAME =

:nodoc:

'Keywords'

Instance Attribute Summary

Attributes inherited from CommonField

#charset, #errors, #name, #value

Instance Method Summary collapse

Methods inherited from NamedStructuredField

#initialize

Methods inherited from CommonField

#decoded, #encoded, #initialize, parse, #parse, #responsible_for?, #singular?, singular?, #to_s

Constructor Details

This class inherits a constructor from Mail::NamedStructuredField

Instance Method Details

#defaultObject



18
19
20
# File 'lib/mail/fields/keywords_field.rb', line 18

def default
  keywords
end

#elementObject



10
11
12
# File 'lib/mail/fields/keywords_field.rb', line 10

def element
  @element ||= PhraseList.new(value)
end

#keywordsObject



14
15
16
# File 'lib/mail/fields/keywords_field.rb', line 14

def keywords
  element.phrases
end