class ResayCrawler
Public Class Methods
new()
click to toggle source
# File lib/resay_crawler.rb, line 7 def initialize ## parse cosole argument -f -c -d @argument_parser = CommandLineArgumentParser.new @argument_parser.parse_arguments ## spider @spider = Spider.new ## read url @url_store = UrlStore.new(@argument_parser.url_file) end
Public Instance Methods
crawl()
click to toggle source
# File lib/resay_crawler.rb, line 20 def crawl ## crawl if @argument_parser.crawl_type == CommandLineArgumentParser::WEB_CRAWLER @spider.crawl_web( @url_store.get_urls, @argument_parser.crawl_depth, @argument_parser.page_limit ) else @spider.crawl_domain( @url_store.get_url, @argument_parser.page_limit ) end end