Sha256: 6d8795dcde0a2f2b6f09916398734ba16d722ce67b3dd1e789213a2ad0eb95bd
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
module Mail module Patterns white_space = %Q|\x9\x20| text = %Q|\x1-\x8\xB\xC\xE-\x7f| field_name = %Q|\x21-\x39\x3b-\x7e| field_body = text aspecial = %Q|()<>[]:;@\\,."| # RFC5322 tspecial = %Q|()<>@,;:\\"/[]?=| # RFC2045 lwsp = %Q| \t\r\n| control = %Q|\x00-\x1f\x7f-\xff| CRLF = /\r\n/ WSP = /[#{white_space}]/ FWS = /#{CRLF}#{WSP}*/ TEXT = /[#{text}]/ # + obs-text FIELD_NAME = /[#{field_name}]+/ FIELD_BODY = /[#{field_body}]+/ FIELD_LINE = /^[#{field_name}]+:\s*[#{field_body}]+$/ HEADER_LINE = /^([#{field_name}]+:\s*[#{field_body}]+)/ CONTROL_CHAR = /[#{control}]/n ATOM_UNSAFE = /[#{Regexp.quote aspecial}#{control}#{lwsp}]/n PHRASE_UNSAFE = /[#{Regexp.quote aspecial}#{control}]/n TOKEN_UNSAFE = /[#{Regexp.quote tspecial}#{control}#{lwsp}]/n module ClassMethods end module InstanceMethods end def self.included(receiver) receiver.extend ClassMethods receiver.send :include, InstanceMethods end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mail-2.1.5 | lib/mail/patterns.rb |