Sha256: 666647afaeb015c4418fd3fd7f8229f510439df65bf9ed8b4a50006000120aec

Contents?: true

Size: 1.47 KB

Versions: 238

Compression:

Stored size: 1.47 KB

Contents

# encoding: utf-8
require 'mail/fields/common/common_field'

module Mail
  # Provides access to a structured header field
  #
  # ===Per RFC 2822:
  #  2.2.2. Structured Header Field Bodies
  #  
  #     Some field bodies in this standard have specific syntactical
  #     structure more restrictive than the unstructured field bodies
  #     described above. These are referred to as "structured" field bodies.
  #     Structured field bodies are sequences of specific lexical tokens as
  #     described in sections 3 and 4 of this standard.  Many of these tokens
  #     are allowed (according to their syntax) to be introduced or end with
  #     comments (as described in section 3.2.3) as well as the space (SP,
  #     ASCII value 32) and horizontal tab (HTAB, ASCII value 9) characters
  #     (together known as the white space characters, WSP), and those WSP
  #     characters are subject to header "folding" and "unfolding" as
  #     described in section 2.2.3.  Semantic analysis of structured field
  #     bodies is given along with their syntax.
  class StructuredField
    
    include Mail::CommonField
    include Mail::Utilities
    
    def initialize(name = nil, value = nil, charset = nil)
      self.name    = name
      self.value   = value
      self.charset = charset
      self
    end
    
    def charset
      @charset
    end
    
    def charset=(val)
      @charset = val
    end
    
    def default
      decoded
    end
    
    def errors
      []
    end

  end
end

Version data entries

238 entries across 195 versions & 23 rubygems

Version Path
mail-2.5.5 lib/mail/fields/structured_field.rb
mail-2.5.5.rc1 lib/mail/fields/structured_field.rb
mail-2.6.4.rc2 lib/mail/fields/structured_field.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/mail-2.6.3/lib/mail/fields/structured_field.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/mail-2.6.3/lib/mail/fields/structured_field.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/mail-2.6.3/lib/mail/fields/structured_field.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mail-2.6.3/lib/mail/fields/structured_field.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/mail-2.6.3/lib/mail/fields/structured_field.rb
mail-2.6.4.rc1 lib/mail/fields/structured_field.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/mail-2.6.3/lib/mail/fields/structured_field.rb
classiccms-0.7.5 vendor/bundle/gems/mail-2.4.4/lib/mail/fields/structured_field.rb
classiccms-0.7.4 vendor/bundle/gems/mail-2.4.4/lib/mail/fields/structured_field.rb
classiccms-0.7.3 vendor/bundle/gems/mail-2.4.4/lib/mail/fields/structured_field.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/mail-2.6.3/lib/mail/fields/structured_field.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/mail-2.6.3/lib/mail/fields/structured_field.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/mail-2.6.3/lib/mail/fields/structured_field.rb
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/fields/structured_field.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/mail-2.6.3/lib/mail/fields/structured_field.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/mail-2.4.4/lib/mail/fields/structured_field.rb
mail-2.6.3 lib/mail/fields/structured_field.rb