Class: LogStruct::ConfigStruct::PathFilterMatcher
- Inherits:
-
T::Struct
- Object
- T::Struct
- LogStruct::ConfigStruct::PathFilterMatcher
- Extended by:
- T::Sig
- Defined in:
- lib/log_struct/config_struct/filters.rb
Overview
A filter that needs more than the key: Rails' entries with a dot (card.number) match a key by its
path, and Rails gives filter blocks with three arguments the parameters around the key. The path
starts at the line's top-level field (["params", "card", "number"]); root is that field's value,
or the whole line for a top-level key, with indifferent access as Rails gives it. Building it copies
every value inside it, so a matcher that doesn't read it sets uses_root to false and gets nil.
Instance Attribute Summary collapse
-
#callable ⇒ T.proc.params(path: T::Array[String], value: T.untyped, root: T.untyped).returns(T::Boolean)
readonly
Returns the value of prop
callable. -
#label ⇒ String
readonly
Returns the value of prop
label. -
#uses_root ⇒ Boolean
readonly
Returns the value of prop
uses_root.
Instance Method Summary collapse
- #initialize(callable:, label:, uses_root: true) ⇒ void constructor
- #matches?(path, value, root) ⇒ Boolean
Constructor Details
#initialize(callable:, label:, uses_root: true) ⇒ void
|
|
# File '' const :callable, T.proc.params(path: T::Array[String], value: T.untyped, root: T.untyped).returns(T::Boolean) const :label, String const :uses_root, T::Boolean, default: true |
Instance Attribute Details
#callable ⇒ T.proc.params(path: T::Array[String], value: T.untyped, root: T.untyped).returns(T::Boolean) (readonly)
Returns the value of prop callable.
|
|
# File '' const :callable, T.proc.params(path: T::Array[String], value: T.untyped, root: T.untyped).returns(T::Boolean) |
#label ⇒ String (readonly)
Returns the value of prop label.
|
|
# File '' const :label, String |
#uses_root ⇒ Boolean (readonly)
Returns the value of prop uses_root.
|
|
# File '' const :uses_root, T::Boolean, default: true |