Sha256: 586c9e991de4348b5ccfb64f35afaca6ba2b6b67825e2e285663d867856908b1
Contents?: true
Size: 354 Bytes
Versions: 3
Compression:
Stored size: 354 Bytes
Contents
class IdsPlease::Vkontakte < IdsPlease::BaseParser MASK = /vk\.com|vkontakte/i def self.parse(links) links.map { |l| parse_link(l) }.compact end def self.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
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ids_please-0.0.3 | lib/ids_please/vkontakte.rb |
ids_please-0.0.2 | lib/ids_please/vkontakte.rb |
ids_please-0.0.1 | lib/ids_please/vkontakte.rb |