lib/license_finder/license/matcher.rb in license_finder-1.0.0.0-java vs lib/license_finder/license/matcher.rb in license_finder-1.0.0.1

- old
+ new

@@ -4,10 +4,15 @@ def self.from_template(template) from_text(template.content) end def self.from_text(text) - new(Text.compile_to_regex(text)) + from_regex(Text.compile_to_regex(text)) + end + + # an alias for Matcher.new, for uniformity of constructors + def self.from_regex(regexp) + new(regexp) end def matches_text?(text) !!(Text.normalize_punctuation(text) =~ regexp) end