Sha256: 891ed031c89d854d5a3ff4cfbd9fac5e81a798a8c2560eef08b323b77aee606f
Contents?: true
Size: 444 Bytes
Versions: 2
Compression:
Stored size: 444 Bytes
Contents
class IdsPlease class Vkontakte < IdsPlease::BaseParser MASK = /vk\.com|vkontakte/i class << self def parse(links) links.map { |l| parse_link(l) }.compact end private def parse_link(link) if link.path =~ /id|club/ id = link.path.sub(/\A\/id|\A\/club/, '') id.split(/[\/\?#]/).first else link.path.split('/')[1] end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ids_please-1.1.2 | lib/ids_please/vkontakte.rb |
ids_please-1.1.1 | lib/ids_please/vkontakte.rb |