class SocialParser::Provider::Github
Constants
- URL_FORMATS
Public Instance Methods
provider()
click to toggle source
# File lib/social_parser/provider/github.rb, line 11 def provider :github end
url()
click to toggle source
# File lib/social_parser/provider/github.rb, line 15 def url "https://github.#{domain}/#{username}" end
Private Instance Methods
parse_from_url()
click to toggle source
# File lib/social_parser/provider/github.rb, line 21 def parse_from_url URL_FORMATS.values.each do |format| m = format.match(url_from_attributes) return m[:id] if m end nil end