Class: Labkit::RateLimit::Evaluator::RuleCursor Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/labkit/rate_limit/evaluator.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Carries the rule in flight out of the rule loop and into the rescue in #check/#peek, where the error is seen but the rule is out of scope. Per call, not instance state: one Evaluator serves concurrent requests. Only read while an exception unwinds; nil means no rule was in flight.

Instance Attribute Summary collapse

Instance Attribute Details

#ruleObject

Returns the value of attribute rule

Returns:

  • (Object)

    the current value of rule



19
20
21
# File 'lib/labkit/rate_limit/evaluator.rb', line 19

def rule
  @rule
end