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



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

def default
  keywords
end

#elementObject



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

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

#keywordsObject



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

def keywords
  element.phrases
end