Class: LicenseFinder::License::AnyMatcher
- Inherits:
-
Object
- Object
- LicenseFinder::License::AnyMatcher
- Defined in:
- lib/license_finder/license/any_matcher.rb
Instance Method Summary collapse
-
#initialize(*matchers) ⇒ AnyMatcher
constructor
A new instance of AnyMatcher.
- #matches_text?(text) ⇒ Boolean
Constructor Details
#initialize(*matchers) ⇒ AnyMatcher
Returns a new instance of AnyMatcher.
6 7 8 |
# File 'lib/license_finder/license/any_matcher.rb', line 6 def initialize(*matchers) @matchers = matchers end |
Instance Method Details
#matches_text?(text) ⇒ Boolean
10 11 12 |
# File 'lib/license_finder/license/any_matcher.rb', line 10 def matches_text?(text) @matchers.any? { |m| m.matches_text? text } end |