Method: HTMLProofer::CLI#run
- Defined in:
- lib/html_proofer/cli.rb
#run(args = ARGV) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/html_proofer/cli.rb', line 13 def run(args = ARGV) @options, path = HTMLProofer::Configuration.new.(args) paths = path.split(",") if @options[:as_links] links = path.split(",").map(&:strip) HTMLProofer.check_links(links, @options).run elsif File.directory?(paths.first) HTMLProofer.check_directories(paths, @options).run else HTMLProofer.check_file(path, @options).run end end |