Sha256: 2dc67dada3521d42b18b1748580ac7fa4260e22a7298095f495c6aa5346ff7ed

Contents?: true

Size: 792 Bytes

Versions: 4

Compression:

Stored size: 792 Bytes

Contents

module RequestLogAnalyzer::Filter
  
  # Filter class loader using const_missing
  # This function will automatically load the class file based on the name of the class
  def self.const_missing(const)
    RequestLogAnalyzer::load_default_class_file(self, const)
  end
  
  # Base filter class used to filter input requests.
  # All filters should interit from this base.
  class Base
    
    attr_reader :file_format, :options
    
    # Initializer
    # <tt>format</tt> The file format
    # <tt>options</tt> Are passed to the filters.
    def initialize(format, options = {})
      @file_format = format
      @options     = options
    end
    
    # Return the request if the request should be kept.
    # Return nil otherwise.
    def filter(request)
      request
    end
  end
  
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
wvanbergen-request-log-analyzer-1.3.6 lib/request_log_analyzer/filter.rb
wvanbergen-request-log-analyzer-1.3.7 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.3.7 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.3.6 lib/request_log_analyzer/filter.rb