Sha256: c4c29c4b819809d1df62bf2b41b93da59e2ddb0f3a5645252f20120d5ea41df4
Contents?: true
Size: 782 Bytes
Versions: 236
Compression:
Stored size: 782 Bytes
Contents
# encoding: utf-8 # # # module Mail class ContentLocationField < StructuredField FIELD_NAME = 'content-location' CAPITALIZED_FIELD = 'Content-Location' def initialize(value = nil, charset = 'utf-8') self.charset = charset super(CAPITALIZED_FIELD, strip_field(FIELD_NAME, value), charset) self.parse self end def parse(val = value) unless val.blank? @element = Mail::ContentLocationElement.new(val) end end def element @element ||= Mail::ContentLocationElement.new(value) end def location element.location end # TODO: Fix this up def encoded "#{CAPITALIZED_FIELD}: #{location}\r\n" end def decoded location end end end
Version data entries
236 entries across 193 versions & 23 rubygems