Sha256: 4b38e1a38f1f87ba91608fce43c0e2d60df6d32656ad958cacd74fc4a9d071b0

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

module RequestLogAnalyzer::Source

  def self.const_missing(const)
    RequestLogAnalyzer::load_default_class_file(self, const)
  end
  
  # Base Source class. All other sources inherit from this class
  class Base
    
    include RequestLogAnalyzer::FileFormat::Awareness

    # A hash of options
    attr_reader :options

    # The current Request object that is being parsed
    attr_reader :current_request

    # The total number of parsed lines
    attr_reader :parsed_lines

    # The total number of parsed requests.
    attr_reader :parsed_requests

    # The number of skipped lines because of warnings
    attr_reader :skipped_lines

    # Base source class used to filter input requests.

    # Initializer
    # <tt>format</tt> The file format
    # <tt>options</tt> Are passed to the filters.
    def initialize(format, options = {})
      @options    = options
      register_file_format(format)
    end
    
    def prepare
    end
    
    def each_request(&block)
      return true
    end

    def finalize
    end

  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
wvanbergen-request-log-analyzer-1.1.3 lib/request_log_analyzer/source.rb
request-log-analyzer-1.1.3 lib/request_log_analyzer/source.rb