Sha256: 9211c430e9de060e6aa46614dd3c6a01b17082270bcd6fb236c2529ffc955e44
Contents?: true
Size: 566 Bytes
Versions: 1
Compression:
Stored size: 566 Bytes
Contents
#coding: utf-8 require 'wombat/crawler' module Wombat class << self attr_reader :proxy_args, :user_agent, :user_agent_alias def crawl(&block) klass = Class.new klass.send(:include, Wombat::Crawler) klass.new.crawl(&block) end def configure yield self end def set_proxy(*args) @proxy_args = args end def set_user_agent(user_agent) @user_agent = user_agent end def set_user_agent_alias(user_agent_alias) @user_agent_alias = user_agent_alias end alias_method :scrape, :crawl end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wombat-2.4.0 | lib/wombat.rb |