Class: LicenseAuto::Matcher::SourceURL

Inherits:
Object
  • Object
show all
Defined in:
lib/license_auto/matcher.rb

Overview

Match all kinds of source_url by their regex patterns.

The follow website URLs can get clear matched result:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ SourceURL

Struct a new matcher by url



23
24
25
# File 'lib/license_auto/matcher.rb', line 23

def initialize(url)
  @url = url
end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



18
19
20
# File 'lib/license_auto/matcher.rb', line 18

def url
  @url
end

Instance Method Details

#match_bitbucket_resourceObject



31
32
33
# File 'lib/license_auto/matcher.rb', line 31

def match_bitbucket_resource
  matched = github_resource.match(@url)
end

#match_github_resourceObject



27
28
29
# File 'lib/license_auto/matcher.rb', line 27

def match_github_resource()
  matched = github_resource.match(@url)
end