Class: LicenseAuto::Matcher::SourceURL
- Inherits:
-
Object
- Object
- LicenseAuto::Matcher::SourceURL
- 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
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url) ⇒ SourceURL
constructor
Struct a new matcher by url.
- #match_bitbucket_resource ⇒ Object
- #match_github_resource ⇒ Object
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
#url ⇒ Object (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_resource ⇒ Object
31 32 33 |
# File 'lib/license_auto/matcher.rb', line 31 def match_bitbucket_resource matched = github_resource.match(@url) end |
#match_github_resource ⇒ Object
27 28 29 |
# File 'lib/license_auto/matcher.rb', line 27 def match_github_resource() matched = github_resource.match(@url) end |