Class: RequestLogAnalyzer::Filter::Base
- Inherits:
-
Object
- Object
- RequestLogAnalyzer::Filter::Base
- Defined in:
- lib/request_log_analyzer/filter.rb
Overview
Base filter class used to filter input requests. All filters should interit from this base.
Instance Attribute Summary collapse
-
#file_format ⇒ Object
readonly
Returns the value of attribute file_format.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#filter(request) ⇒ Object
Return the request if the request should be kept.
-
#initialize(format, options = {}) ⇒ Base
constructor
Initializer
format
The file formatoptions
Are passed to the filters.
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, = {}) @file_format = format = end |
Instance Attribute Details
#file_format ⇒ Object (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 |
#options ⇒ Object (readonly)
Returns the value of attribute options.
13 14 15 |
# File 'lib/request_log_analyzer/filter.rb', line 13 def 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 |