class ViaqMatchClass

Public Class Methods

new(pattern_str, unused) click to toggle source
# File lib/fluent/plugin/filter_viaq_data_model.rb, line 32
def initialize(pattern_str, unused)
  patterns = pattern_str.split(/\s+/).map {|str|
    Fluent::MatchPattern.create(str)
  }
  if patterns.length == 1
    @pattern = patterns[0]
  else
    @pattern = Fluent::OrMatchPattern.new(patterns)
  end
end

Public Instance Methods

match(tag) click to toggle source
# File lib/fluent/plugin/filter_viaq_data_model.rb, line 42
def match(tag)
  @pattern.match(tag)
end
to_s() click to toggle source
# File lib/fluent/plugin/filter_viaq_data_model.rb, line 45
def to_s
  "#{@pattern}"
end