class Pipio::HtmlLogParser
Constants
- TIMESTAMP_REGEX
Public Class Methods
new(source_file_path, user_aliases)
click to toggle source
# File lib/pipio/parsers/html_log_parser.rb, line 5 def initialize(source_file_path, user_aliases) # @line_regex matches a line in an HTML log file other than the first. line_regex = /#{TIMESTAMP_REGEX} ?<b>(?<sn_or_alias>.+?) ?(?<auto_reply><AUTO-REPLY>)?:?<\/b> ?(?<body>.+)<br ?\/>/o # @line_regex_status matches a status or event line. line_regex_status = /#{TIMESTAMP_REGEX} ?<b> (?<body>.+)<\/b><br ?\/>/o cleaner = Cleaners::HtmlCleaner @parser = BasicParser.new(source_file_path, user_aliases, line_regex, line_regex_status, cleaner) end
Public Instance Methods
parse()
click to toggle source
# File lib/pipio/parsers/html_log_parser.rb, line 18 def parse @parser.parse end