Method: Wgit::DSL#start

Defined in:
lib/wgit/dsl.rb

#start(*urls) {|crawler| ... } ⇒ Object Also known as: start_urls

Sets the URL to be crawled when a crawl* or index* method is subsequently called. Calling this is optional as the URL can be passed to the method instead. You can also omit the url param and just use the block to configure the crawler instead.

Parameters:

  • urls (*String, *Wgit::Url)

    The URL(s) to crawl or nil (if only using the block to configure the crawler).

Yields:

  • (crawler)

    The crawler that'll be used in the subsequent crawl/index; use the block to configure.



68
69
70
71
# File 'lib/wgit/dsl.rb', line 68

def start(*urls, &block)
  use_crawler(&block) if block_given?
  @dsl_start = urls
end