Class: SocialParser::Provider::Github
- Defined in:
- lib/social_parser/provider/github.rb
Constant Summary collapse
- URL_FORMATS =
{ full: /((https?)?:\/\/)?(www\.)?github\.com\/(?<id>[\w\-\.]+)?/i # regular: /\Ahttps?:\/\/github\.com\/(?<id>.+?)\/?\Z/ }
Instance Method Summary collapse
Methods inherited from Base
#domain, #embed_url, parse, #username, #valid?
Methods inherited from Link
#attributes, #embed_url, #id, #initialize, #username
Constructor Details
This class inherits a constructor from SocialParser::Link
Instance Method Details
#provider ⇒ Object
11 12 13 |
# File 'lib/social_parser/provider/github.rb', line 11 def provider :github end |
#url ⇒ Object
15 16 17 |
# File 'lib/social_parser/provider/github.rb', line 15 def url "https://github.#{domain}/#{username}" end |