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.
133 134 135 |
# File 'lib/fluent/match.rb', line 133 def initialize(patterns) @patterns = patterns end |
Instance Method Details
#match(str) ⇒ Object
137 138 139 |
# File 'lib/fluent/match.rb', line 137 def match(str) @patterns.any? {|pattern| pattern.match(str) } end |