Class: Fluent::Plugin::GrepFilter::Expression
- Inherits:
-
Struct
- Object
- Struct
- Fluent::Plugin::GrepFilter::Expression
- Defined in:
- lib/fluent/plugin/filter_grep.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
Instance Method Summary collapse
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key
183 184 185 |
# File 'lib/fluent/plugin/filter_grep.rb', line 183 def key @key end |
#pattern ⇒ Object
Returns the value of attribute pattern
183 184 185 |
# File 'lib/fluent/plugin/filter_grep.rb', line 183 def pattern @pattern end |
Instance Method Details
#match?(record) ⇒ Boolean
184 185 186 |
# File 'lib/fluent/plugin/filter_grep.rb', line 184 def match?(record) ::Fluent::StringUtil.match_regexp(pattern, key.call(record).to_s) end |