Module: Mail::Patterns

Included in:
Encodings, Field, Header, Message, Utilities::InstanceMethods
Defined in:
lib/mail/patterns.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Constant Summary collapse

CRLF =
/\r\n/
WSP =
/[#{white_space}]/
FWS =
/#{CRLF}#{WSP}*/
TEXT =

+ obs-text

/[#{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

Class Method Summary collapse

Class Method Details

.included(receiver) ⇒ Object



37
38
39
40
# File 'lib/mail/patterns.rb', line 37

def self.included(receiver)
  receiver.extend         ClassMethods
  receiver.send :include, InstanceMethods
end