Sha256: 033bbaf0be82e07d83a02cb2e8b6878c85ddaa78e220a9b1dde3fd1063feaf73
Contents?: true
Size: 806 Bytes
Versions: 1
Compression:
Stored size: 806 Bytes
Contents
require 'ostruct' require 'anemone/core' module Anemone # Version number VERSION = '0.0.2' # User-Agent string used for HTTP requests USER_AGENT = "Anemone/#{self::VERSION}" #module-wide options def Anemone.options=(options) @options = options end def Anemone.options @options end # # Convenience method to start a crawl using Core # def Anemone.crawl(url, options = {}, &block) Anemone.options = OpenStruct.new(options) #by default, run 4 Tentacle threads to fetch pages Anemone.options.threads ||= 4 #disable verbose output by default Anemone.options.verbose ||= false #by default, don't throw away the page response body after scanning it for links Anemone.options.discard_page_bodies ||= false Core.crawl(url, &block) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
anemone-0.0.3 | lib/anemone/anemone.rb |