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.



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

Returns:

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