Module: Mail::Parsers::Ragel::Ruby

Defined in:
lib/mail/parsers/ragel/ruby.rb

Constant Summary

MACHINE_LIST =
{
  :address_lists => AddressListsMachine,
  :phrase_lists => PhraseListsMachine,
  :date_time => DateTimeMachine,
  :received => ReceivedMachine,
  :message_ids => MessageIdsMachine,
  :envelope_from => EnvelopeFromMachine,
  :mime_version => MimeVersionMachine,
  :content_type => ContentTypeMachine,
  :content_disposition => ContentDispositionMachine,
  :content_transfer_encoding => ContentTransferEncodingMachine,
  :content_location => ContentLocationMachine
}

Class Method Summary collapse

Class Method Details

.parse(machine, string) ⇒ Object



34
35
36
# File 'lib/mail/parsers/ragel/ruby.rb', line 34

def self.parse(machine, string)
  MACHINE_LIST[machine].parse(string)
end

.silence_warningsObject



5
6
7
8
9
10
# File 'lib/mail/parsers/ragel/ruby.rb', line 5

def self.silence_warnings
  old, $VERBOSE = $VERBOSE, nil
  yield
ensure
  $VERBOSE = old
end