class Sqreen::Rules::CountHTTPCodes

Save request context for handling further down

Constants

METRIC_CATEGORY

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/sqreen/rules/count_http_codes.rb, line 15
def initialize(*args)
  super(*args)
  @overtimeable = false
end

Public Instance Methods

post(rv, _inst, _args, _budget = nil, &_block) click to toggle source
# File lib/sqreen/rules/count_http_codes.rb, line 20
def post(rv, _inst, _args, _budget = nil, &_block)
  return unless rv.is_a?(Array) && !rv.empty?
  record_observation(METRIC_CATEGORY, rv[0], 1)
  advise_action(nil)
end