Class: ScoutApm::SlowPolicy::Policy
- Inherits:
-
Object
- Object
- ScoutApm::SlowPolicy::Policy
- Defined in:
- lib/scout_apm/slow_policy/policy.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #call(request) ⇒ Object
-
#initialize(context) ⇒ Policy
constructor
A new instance of Policy.
-
#stored!(request) ⇒ Object
Override in subclasses to execute some behavior if the request gets a slot in the ScoredItemSet.
Constructor Details
#initialize(context) ⇒ Policy
Returns a new instance of Policy.
8 9 10 |
# File 'lib/scout_apm/slow_policy/policy.rb', line 8 def initialize(context) @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/scout_apm/slow_policy/policy.rb', line 6 def context @context end |
Instance Method Details
#call(request) ⇒ Object
12 13 14 |
# File 'lib/scout_apm/slow_policy/policy.rb', line 12 def call(request) raise NotImplementedError end |
#stored!(request) ⇒ Object
Override in subclasses to execute some behavior if the request gets a slot in the ScoredItemSet. Defaults to no-op
18 19 |
# File 'lib/scout_apm/slow_policy/policy.rb', line 18 def stored!(request) end |