Sha256: 9d30567e209abc59ebdf537782652e249d713f85e9686ac6e7574407825cef21
Contents?: true
Size: 683 Bytes
Versions: 130
Compression:
Stored size: 683 Bytes
Contents
# encoding: utf-8 module Mail class ReceivedElement include Mail::Utilities def initialize( string ) parser = Mail::ReceivedParser.new if tree = parser.parse(string) @date_time = ::DateTime.parse("#{tree.date_time.date.text_value} #{tree.date_time.time.text_value}") @info = tree.name_val_list.text_value else raise Mail::Field::ParseError, "ReceivedElement can not parse |#{string}|\nReason was: #{parser.failure_reason}\n" end end def date_time @date_time end def info @info end def to_s(*args) "#{@info}; #{@date_time.to_s(*args)}" end end end
Version data entries
130 entries across 100 versions & 6 rubygems