Sha256: 633a08824284cbaffa6de79bad511a3e7f0622b4cdd74d377fa9de09fb8336f0

Contents?: true

Size: 870 Bytes

Versions: 10

Compression:

Stored size: 870 Bytes

Contents

require 'spidr/agent'

module Spidr
  # Common proxy port.
  COMMON_PROXY_PORT = 8080

  #
  # Returns the +Hash+ of the Spidr proxy information.
  #
  def Spidr.proxy
    @@spidr_proxy ||= {:host => nil, :port => COMMON_PROXY_PORT, :user => nil, :password => nil}
  end

  #
  # Returns the Spidr User-Agent
  #
  def Spidr.user_agent
    @@spidr_user_agent ||= nil
  end

  #
  # Sets the Spidr Web User-Agent to the specified _new_agent_.
  #
  def Spidr.user_agent=(new_agent)
    @@spidr_user_agent = new_agent
  end

  #
  # See Agent.start_at.
  #
  def Spidr.start_at(url,options={},&block)
    Agent.start_at(url,options,&block)
  end

  #
  # See Agent.host.
  #
  def Spidr.host(name,options={},&block)
    Agent.host(name,options,&block)
  end

  #
  # See Agent.site.
  #
  def Spidr.site(url,options={},&block)
    Agent.site(url,options,&block)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spidr-0.1.3 lib/spidr/spidr.rb
spidr-0.1.5 lib/spidr/spidr.rb
spidr-0.1.1 lib/spidr/spidr.rb
spidr-0.1.0 lib/spidr/spidr.rb
spidr-0.1.4 lib/spidr/spidr.rb
spidr-0.1.6 lib/spidr/spidr.rb
spidr-0.1.2 lib/spidr/spidr.rb
spidr-0.1.9 lib/spidr/spidr.rb
spidr-0.1.7 lib/spidr/spidr.rb
spidr-0.1.8 lib/spidr/spidr.rb