lib/email_reply_parser.rb
def multiline_quote_header_in_fragment?(fragment)
      fragment_text = @fragment.lines.join("\n")
      
      from_labels = ["From", "De"]
      to_labels = ["To", "Para"]
      date_labels = ["Date", "Sent", "Enviada em"]
      subject_labels = ["Subject", "Assunto"]
      reply_to_labels = ["Reply-To"]

      quoted_header_regexp = 
        multiline_quoted_header_regexps(
          :from => create_regexp_for_labels(from_labels),
          :to => create_regexp_for_labels(to_labels),
          :date => create_regexp_for_labels(date_labels),
          :subject => create_regexp_for_labels(subject_labels),
          :reply_to => create_regexp_for_labels(reply_to_labels)
        )
           
      fragment_text =~ quoted_header_regexp
    end
# Detects if a fragment has a multiline quote header
#
# fragment - fragment to look in
#
# Returns true if the fragment has header, or false.
Detects if a fragment has a multiline quote header
fragment - fragment to look in

Returns true if the fragment has header, or false.
Detects if a fragment has a multiline quote header fragment - fragment to look in Returns true if the fragment has header or false .
def multiline_quote_header_in_fragment?(fragment)
      fragment_text = @fragment.lines.join("\n")
      from_labels = ["From", "De"]
      to_labels = ["To", "Para"]
      date_labels = ["Date", "Sent", "Enviada em"]
      subject_labels = ["Subject", "Assunto"]
      reply_to_labels = ["Reply-To"]
      quoted_header_regexp = 
        multiline_quoted_header_regexps(
          :from => create_regexp_for_labels(from_labels),
          :to => create_regexp_for_labels(to_labels),
          :date => create_regexp_for_labels(date_labels),
          :subject => create_regexp_for_labels(subject_labels),
          :reply_to => create_regexp_for_labels(reply_to_labels)
        )
      fragment_text =~ quoted_header_regexp
    end
def multiline_quote_header_in_fragment? ( fragment ) fragment_text = @fragment . lines . join ( "\n" ) from_labels = [ "From" , "De" ] to_labels = [ "To" , "Para" ] date_labels = [ "Date" , "Sent" , "Enviada em" ] subject_labels = [ "Subject" , "Assunto" ] reply_to_labels = [ "Reply-To" ] quoted_header_regexp = multiline_quoted_header_regexps ( :from => create_regexp_for_labels ( from_labels ) , :to => create_regexp_for_labels ( to_labels ) , :date => create_regexp_for_labels ( date_labels ) , :subject => create_regexp_for_labels ( subject_labels ) , :reply_to => create_regexp_for_labels ( reply_to_labels ) ) fragment_text =~ quoted_header_regexp end
Detects if a fragment has a multiline quote header
fragment - fragment to look in
Detects if a fragment has a multiline quote header fragment - fragment to look in
fragment