Sha256: 34dfc22b1d3bfb96c4e54da2d7046774807220e3622dcb238123fc922395939a

Contents?: true

Size: 647 Bytes

Versions: 3

Compression:

Stored size: 647 Bytes

Contents

require_relative 'grabbers/base'
require_relative 'grabbers/facebook'
require_relative 'grabbers/vkontakte'
require_relative 'grabbers/instagram'
require_relative 'grabbers/twitter'
require_relative 'grabbers/mailru'

class IdsPlease
  module Grabbers

    NETWORKS = {
      facebook: IdsPlease::Grabbers::Facebook,
      vkontakte: IdsPlease::Grabbers::Vkontakte,
      twitter: IdsPlease::Grabbers::Twitter,
      instagram: IdsPlease::Grabbers::Instagram,
      mailru: IdsPlease::Grabbers::Mailru,
    }

    def self.each
      NETWORKS.values.each { |n| yield n }
    end

    def self.by_symbol(sym)
      NETWORKS[sym]
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ids_please-2.1.2 lib/ids_please/grabbers.rb
ids_please-2.1.1 lib/ids_please/grabbers.rb
ids_please-2.1.0 lib/ids_please/grabbers.rb