Sha256: 9b76c00ff5b8385db95efff56ada368d2e68da9e7754c4634612d5d976dfe672

Contents?: true

Size: 681 Bytes

Versions: 6

Compression:

Stored size: 681 Bytes

Contents

require 'proxy_manager/main'
require 'net/ping'

module ProxyManager
  # Define gem's root path
  # @return [String] string path
  def self.root
    File.expand_path '../..', __FILE__
  end

  # Create main object
  # @param proxies [Array, String] array of proxies or file with proxies
  # @param bad_proxies [String, nil] optional file for save bad proxies
  # @example
  #   # from array
  #   proxy = ProxyManager.load(['1.2.3.4:567', '9.8.7.6:543'])
  #
  #   # or from file
  #   proxy = ProxyManager.load('proxies.txt', 'bad_proxies.txt')
  # @return [Class] Main object
  # @see Main
  def self.load(proxies, bad_proxies = nil)
    Main.new(proxies, bad_proxies)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
proxy_manager-0.0.9 lib/proxy_manager.rb
proxy_manager-0.0.8 lib/proxy_manager.rb
proxy_manager-0.0.7 lib/proxy_manager.rb
proxy_manager-0.0.6 lib/proxy_manager.rb
proxy_manager-0.0.5 lib/proxy_manager.rb
proxy_manager-0.0.3 lib/proxy_manager.rb