class SocialParser::Provider::Linkedin
Constants
- URL_FORMATS
Public Instance Methods
provider()
click to toggle source
# File lib/social_parser/provider/linkedin.rb, line 10 def provider :linkedin end
type()
click to toggle source
# File lib/social_parser/provider/linkedin.rb, line 14 def type @type || 'in' end
url()
click to toggle source
# File lib/social_parser/provider/linkedin.rb, line 18 def url "https://www.linkedin.#{domain}/#{type}/#{username}" end
Private Instance Methods
parse_from_url()
click to toggle source
# File lib/social_parser/provider/linkedin.rb, line 24 def parse_from_url URL_FORMATS.values.each do |format| m = format.match(url_from_attributes) next unless m @type = m[:type] if m.names.include?('type') return m[:id] end nil end