Class: RequestLogAnalyzer::Filter::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/request_log_analyzer/filter.rb

Overview

Base filter class used to filter input requests. All filters should interit from this base.

Direct Known Subclasses

Anonymize, Field, Timespan

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(format, options = {}) ⇒ Base

Initializer format The file format options Are passed to the filters.



18
19
20
21
# File 'lib/request_log_analyzer/filter.rb', line 18

def initialize(format, options = {})
  @file_format = format
  @options     = options
end

Instance Attribute Details

#file_formatObject (readonly)

Returns the value of attribute file_format.



13
14
15
# File 'lib/request_log_analyzer/filter.rb', line 13

def file_format
  @file_format
end

#optionsObject (readonly)

Returns the value of attribute options.



13
14
15
# File 'lib/request_log_analyzer/filter.rb', line 13

def options
  @options
end

Instance Method Details

#filter(request) ⇒ Object

Return the request if the request should be kept. Return nil otherwise.



25
26
27
# File 'lib/request_log_analyzer/filter.rb', line 25

def filter(request)
  request
end