lib/site_checker.rb in site_checker-0.2.1 vs lib/site_checker.rb in site_checker-0.3.0
- old
+ new
@@ -5,10 +5,12 @@
require 'site_checker/io/content_from_web'
require 'site_checker/parse/page'
require 'site_checker/link'
require 'site_checker/link_collector'
require 'site_checker/dsl'
+require 'site_checker/version'
+require 'site_checker/cli/cli'
module SiteChecker
class << self
attr_accessor :ignore_list
attr_accessor :visit_references
@@ -42,12 +44,12 @@
##
# Recursively visits the provided url looking for reference problems.
#
# @param [String] url where the processing starts
- # @param [String] root the root URL of the site
+ # @param [String] root (optional) the root URL of the site. If not provided then the method will use the url to figure it out.
#
- def check(url, root)
+ def check(url, root=nil)
create_instance
@link_collector.check(url, root)
end
##
\ No newline at end of file