Class: IdsPlease::Parsers::Vkontakte
- Defined in:
- lib/ids_please/parsers/vkontakte.rb
Constant Summary collapse
- MASK =
/vk\.com|vkontakte|new\.vk\.com/i
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.interact(links) ⇒ Object
8 9 10 |
# File 'lib/ids_please/parsers/vkontakte.rb', line 8 def interact(links) links.map { |l| parse_link(l) }.compact end |
.parse_link(link) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/ids_please/parsers/vkontakte.rb', line 12 def parse_link(link) if link.path =~ /id|club|public/ id = link.path.sub(/\A\/id|\A\/club|\A\/public/, '') id.split(/[\/\?#]/).first else super end end |