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)


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

def self.singular?
  true
end

Instance Method Details

#decodedObject



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

def decoded
  location
end

#elementObject



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

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

#encodedObject



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

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

#locationObject



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

def location
  element.location
end