Class: Mail::ContentLocationField

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

Overview

:nodoc:

Constant Summary collapse

NAME =
'Content-Location'

Instance Attribute Summary

Attributes inherited from CommonField

#charset, #errors, #name, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from NamedStructuredField

#initialize

Methods inherited from CommonField

#default, #initialize, parse, #parse, #responsible_for?, #singular?, #to_s

Constructor Details

This class inherits a constructor from Mail::NamedStructuredField

Class Method Details

.singular?Boolean

Returns:

  • (Boolean)


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

def self.singular?
  true
end

Instance Method Details

#decodedObject



25
26
27
# File 'lib/mail/fields/content_location_field.rb', line 25

def decoded
  location
end

#elementObject



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

def element
  @element ||= Mail::ContentLocationElement.new(value)
end

#encodedObject



21
22
23
# File 'lib/mail/fields/content_location_field.rb', line 21

def encoded
  "#{name}: #{location}\r\n"
end

#locationObject



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

def location
  element.location
end