class Mail::ContentLocationField
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/content_location_field.rb, line 12 def initialize(value = nil, charset = 'utf-8') self.charset = charset super(CAPITALIZED_FIELD, value, charset) self.parse self end
Public Instance Methods
decoded()
click to toggle source
# File lib/mail/fields/content_location_field.rb, line 38 def decoded location end
element()
click to toggle source
# File lib/mail/fields/content_location_field.rb, line 25 def element @element ||= Mail::ContentLocationElement.new(value) end
encoded()
click to toggle source
TODO: Fix this up
# File lib/mail/fields/content_location_field.rb, line 34 def encoded "#{CAPITALIZED_FIELD}: #{location}\r\n" end
location()
click to toggle source
# File lib/mail/fields/content_location_field.rb, line 29 def location element.location end
parse(val = value)
click to toggle source
# File lib/mail/fields/content_location_field.rb, line 19 def parse(val = value) unless Utilities.blank?(val) @element = Mail::ContentLocationElement.new(val) end end