Module: LicenseFinder::License::Text
- Defined in:
- lib/license_finder/license/text.rb
Constant Summary collapse
- SPACES =
/\s+/
- QUOTES =
/['`"]{1,2}/
- PLACEHOLDERS =
/<[^<>]+>/
Class Method Summary collapse
Class Method Details
.compile_to_regex(text) ⇒ Object
14 15 16 |
# File 'lib/license_finder/license/text.rb', line 14 def self.compile_to_regex(text) Regexp.new(Regexp.escape(text).gsub(PLACEHOLDERS, '(.*)')) end |