Class: IdsPlease::Parsers::Linkedin
- Defined in:
- lib/ids_please/parsers/linkedin.rb
Constant Summary collapse
- MASK =
/linkedin/i
Class Method Summary collapse
Methods inherited from Base
interact, to_sym, valid_id_regex
Class Method Details
.parse_link(link) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ids_please/parsers/linkedin.rb', line 8 def parse_link(link) query = CGI.parse(link.query) if link.query && !link.query.empty? if query && !query['id'].empty? query['id'].first elsif link.path =~ /\/in\// link.path.split('/')[2] elsif link.path =~ /\/company\// link.path.split('/')[2] end end |