Sha256: 41e63a4121fc10c54cc353e44230e5710b2199ecd1875a5c43a91fbb675c077d

Contents?: true

Size: 915 Bytes

Versions: 37

Compression:

Stored size: 915 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
    
    include RequestLogAnalyzer::FileFormat::Awareness
    
    attr_reader :log_parser
    attr_reader :options
    
    # 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
    
    # Return the request if the request should be kept.
    # Return nil otherwise.
    def filter(request)
      return nil unless request
      return request
    end   
  end
  
end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
request-log-analyzer-1.3.5 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.3.4 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.3.3 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.3.2 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.3.1 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.3.0 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.2.9 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.2.8 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.2.7 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.2.6 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.2.3 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.2.1 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.1.6 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.1.3 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.2.0 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.1.5.1 lib/request_log_analyzer/filter.rb
request-log-analyzer-1.1.4 lib/request_log_analyzer/filter.rb