Provides access to an unstructured header field
2.2.1. Unstructured Header Field Bodies Some field bodies in this standard are defined simply as "unstructured" (which is specified below as any US-ASCII characters, except for CR and LF) with no further restrictions. These are referred to as unstructured field bodies. Semantically, unstructured field bodies are simply to be treated as a single line of characters with no further processing (except for header "folding" and "unfolding" as described in section 2.2.3).
# File lib/mail/fields/unstructured_field.rb, line 24 def initialize(name, value, charset = nil) @errors = [] if value.is_a?(Array) # Probably has arrived here from a failed parse of an AddressList Field value = value.join(', ') else # Ensure we are dealing with a string value = value.to_s end if charset self.charset = charset else if value.respond_to?(:encoding) self.charset = value.encoding else self.charset = $KCODE end end self.name = name self.value = value self end
# File lib/mail/fields/unstructured_field.rb, line 53 def decoded do_decode end
# File lib/mail/fields/unstructured_field.rb, line 57 def default decoded end
Generated with the Darkfish Rdoc Generator 2.