Class: Fluent::OrMatchPattern
- Inherits:
-
MatchPattern
- Object
- MatchPattern
- Fluent::OrMatchPattern
- Defined in:
- lib/fluent/match.rb
Instance Method Summary collapse
-
#initialize(patterns) ⇒ OrMatchPattern
constructor
A new instance of OrMatchPattern.
- #match(str) ⇒ Object
Methods inherited from MatchPattern
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 |