Class: LicenseFinder::License::AnyMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/license_finder/license/any_matcher.rb

Instance Method Summary collapse

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

Returns:

  • (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