Sha256: 4251a59e49a779f5e9c51646ac9ae84ae75128f9d430e2635f5896fcd7978e8f

Contents?: true

Size: 1.38 KB

Versions: 17

Compression:

Stored size: 1.38 KB

Contents

module RequestLogAnalyzer::Aggregator

  def self.const_missing(const)
    RequestLogAnalyzer::load_default_class_file(self, const)
  end

  # The base class of an aggregator. This class provides the interface to which
  # every aggregator should comply (by simply subclassing this class).
  class Base

    attr_reader :options, :source

    # Intializes a new RequestLogAnalyzer::Aggregator::Base instance
    # It will include the specific file format module.
    def initialize(source, options = {})
      @source = source
      @options = options
    end

    # The prepare function is called just before parsing starts. This function
    # can be used to initialie variables, etc.
    def prepare
    end

    # The aggregate function is called for every request.
    # Implement the aggregating functionality in this method
    def aggregate(request)
    end

    # The finalize function is called after all sources are parsed and no more
    # requests will be passed to the aggregator
    def finalize
    end

    # The warning method is called if the parser eits a warning.
    def warning(type, message, lineno)
    end

    # The report function is called at the end. Implement any result reporting
    # in this function.
    def report(output)
    end

    # The source_change function gets called when handling a source is started or finished.
    def source_change(change, filename)
    end

  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
request-log-analyzer-1.8.0 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.7.0 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.6.4 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.6.3 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.6.2 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.6.1 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.6.0 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.5.4 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.5.3 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.5.2 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.5.1 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.5.0 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.4.2 lib/request_log_analyzer/aggregator.rb
ngmoco-request-log-analyzer-1.4.2 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.4.1 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.4.0.1 lib/request_log_analyzer/aggregator.rb
request-log-analyzer-1.4.0 lib/request_log_analyzer/aggregator.rb