Class: Fluent::OrMatchPattern

Inherits:
MatchPattern show all
Defined in:
lib/fluent/match.rb

Instance Method Summary collapse

Methods inherited from MatchPattern

create

Constructor Details

#initialize(patterns) ⇒ OrMatchPattern

Returns a new instance of OrMatchPattern.



142
143
144
# File 'lib/fluent/match.rb', line 142

def initialize(patterns)
  @patterns = patterns
end

Instance Method Details

#match(str) ⇒ Object



146
147
148
# File 'lib/fluent/match.rb', line 146

def match(str)
  @patterns.any? {|pattern| pattern.match(str) }
end