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.
4 5 6 |
# File 'lib/license_finder/license/any_matcher.rb', line 4 def initialize(*matchers) @matchers = matchers end |
Instance Method Details
#matches_text?(text) ⇒ Boolean
8 9 10 |
# File 'lib/license_finder/license/any_matcher.rb', line 8 def matches_text?(text) @matchers.any? { |m| m.matches_text? text } end |