Class: Fluent::Plugin::Condition

Inherits:
Struct
  • Object
show all
Defined in:
lib/fluent/plugin/out_conditional_tag_rewrite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#patternObject

Returns the value of attribute pattern

Returns:

  • (Object)

    the current value of pattern



89
90
91
# File 'lib/fluent/plugin/out_conditional_tag_rewrite.rb', line 89

def pattern
  @pattern
end

#record_accessorObject

Returns the value of attribute record_accessor

Returns:

  • (Object)

    the current value of record_accessor



89
90
91
# File 'lib/fluent/plugin/out_conditional_tag_rewrite.rb', line 89

def record_accessor
  @record_accessor
end

Instance Method Details

#match?(record) ⇒ Boolean

Returns:

  • (Boolean)


90
91
92
# File 'lib/fluent/plugin/out_conditional_tag_rewrite.rb', line 90

def match?(record)
  StringUtil.match_regexp(pattern, record_accessor.call(record).to_s)
end