Sha256: aeba333d0627c6d7b59f4e159187f37c3ca4617f36cefab14891340a7cd17b96

Contents?: true

Size: 522 Bytes

Versions: 2

Compression:

Stored size: 522 Bytes

Contents

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

class IdsPlease
  module Grabbers

    NETWORKS = [
      IdsPlease::Grabbers::Facebook,
      IdsPlease::Grabbers::Vkontakte,
      IdsPlease::Grabbers::Instagram
    ]

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

    def self.by_symbol(sym)
      klass_name = "#{sym.to_s[0].upcase}#{sym.to_s[1..-1]}"
      self.const_get(klass_name)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ids_please-2.0.0.beta1 lib/ids_please/grabbers.rb
ids_please-2.0.0.beta lib/ids_please/grabbers.rb