Class: SelectRailsLog::Filter::HttpMethodFilter
- Inherits:
-
BaseFilter
- Object
- Extension
- BaseFilter
- SelectRailsLog::Filter::HttpMethodFilter
- Defined in:
- lib/select_rails_log/filter/http_method_filter.rb
Constant Summary
Constants included from Constants
Constants::ACTION, Constants::CLIENT, Constants::COMPLETED, Constants::CONTROLLER, Constants::DEBUG, Constants::DEFAULT_OUTPUT, Constants::DURATION, Constants::HTTP_METHOD, Constants::HTTP_STATUS, Constants::ID, Constants::INTERVAL, Constants::LOGS, Constants::MESSAGE, Constants::PARAMETERS, Constants::PATH, Constants::PERFORMANCE, Constants::PERFORMANCE_ACTIVE_RECORD, Constants::PERFORMANCE_ALLOCATIONS, Constants::PERFORMANCE_VIEWS, Constants::PID, Constants::RAW_LOGS, Constants::REQUEST_ID, Constants::SEVERITY, Constants::STARTED, Constants::TIME
Instance Attribute Summary
Attributes inherited from Extension
Instance Method Summary collapse
-
#initialize ⇒ HttpMethodFilter
constructor
A new instance of HttpMethodFilter.
- #run(data) ⇒ Object
- #runnable? ⇒ Boolean
Methods inherited from BaseFilter
filter_type, #line_filter?, #request_filter?
Methods inherited from Extension
Constructor Details
#initialize ⇒ HttpMethodFilter
Returns a new instance of HttpMethodFilter.
12 13 14 15 |
# File 'lib/select_rails_log/filter/http_method_filter.rb', line 12 def initialize(...) super @http_method = [:http_method]&.upcase end |
Instance Method Details
#run(data) ⇒ Object
21 22 23 |
# File 'lib/select_rails_log/filter/http_method_filter.rb', line 21 def run(data) data[HTTP_METHOD] == @http_method end |
#runnable? ⇒ Boolean
17 18 19 |
# File 'lib/select_rails_log/filter/http_method_filter.rb', line 17 def runnable? !!@http_method end |