Class: LogStruct::ConfigStruct::FilterMatcher
- Inherits:
-
T::Struct
- Object
- T::Struct
- LogStruct::ConfigStruct::FilterMatcher
- Extended by:
- T::Sig
- Defined in:
- lib/log_struct/config_struct/filters.rb
Instance Attribute Summary collapse
-
#callable ⇒ T.proc.params(key: String, value: T.untyped).returns(T::Boolean)
readonly
Returns the value of prop
callable. -
#label ⇒ String
readonly
Returns the value of prop
label. -
#matches_logstruct_fields ⇒ Boolean
readonly
Whether the matcher also applies to the names of LogStruct's own fields at the top of a line.
Instance Method Summary collapse
- #initialize(callable:, label:, matches_logstruct_fields: true) ⇒ void constructor
- #matches?(key, value) ⇒ Boolean
Constructor Details
#initialize(callable:, label:, matches_logstruct_fields: true) ⇒ void
|
|
# File '' const :callable, T.proc.params(key: String, value: T.untyped).returns(T::Boolean) const :label, String const :matches_logstruct_fields, T::Boolean, default: true |
Instance Attribute Details
#callable ⇒ T.proc.params(key: String, value: T.untyped).returns(T::Boolean) (readonly)
Returns the value of prop callable.
|
|
# File '' const :callable, T.proc.params(key: String, value: T.untyped).returns(T::Boolean) |
#label ⇒ String (readonly)
Returns the value of prop label.
|
|
# File '' const :label, String |
#matches_logstruct_fields ⇒ Boolean (readonly)
Whether the matcher also applies to the names of LogStruct's own fields at the top of a line. LogStruct's matcher for Rails' partial matches doesn't: Rails' default :_key would filter cron_key.
|
|
# File '' const :matches_logstruct_fields, T::Boolean, default: true |
Instance Method Details
#matches?(key, value) ⇒ Boolean
33 34 35 |
# File 'lib/log_struct/config_struct/filters.rb', line 33 def matches?(key, value) callable.call(key, value) end |