Module: HTMLProofer
- Defined in:
- lib/html_proofer.rb,
lib/html_proofer/cli.rb,
lib/html_proofer/log.rb,
lib/html_proofer/cache.rb,
lib/html_proofer/check.rb,
lib/html_proofer/utils.rb,
lib/html_proofer/runner.rb,
lib/html_proofer/element.rb,
lib/html_proofer/failure.rb,
lib/html_proofer/version.rb,
lib/html_proofer/reporter.rb,
lib/html_proofer/attribute.rb,
lib/html_proofer/check/links.rb,
lib/html_proofer/check/images.rb,
lib/html_proofer/attribute/url.rb,
lib/html_proofer/check/favicon.rb,
lib/html_proofer/check/scripts.rb,
lib/html_proofer/configuration.rb,
lib/html_proofer/url_validator.rb,
lib/html_proofer/xpath_functions.rb,
lib/html_proofer/check/open_graph.rb,
lib/html_proofer/reporter/terminal.rb,
lib/html_proofer/url_validator/external.rb,
lib/html_proofer/url_validator/internal.rb
Defined Under Namespace
Modules: Utils
Classes: Attribute, CLI, Cache, Check, Configuration, Element, Failure, Log, Reporter, Runner, UrlValidator, XpathFunctions
Constant Summary
collapse
- VERSION =
"5.0.9"
Class Method Summary
collapse
Class Method Details
.check_directories(directories, options = {}) ⇒ Object
43
44
45
46
47
48
49
50
51
|
# File 'lib/html_proofer.rb', line 43
def check_directories(directories, options = {})
raise ArgumentError unless directories.is_a?(Array)
options[:type] = :directory
directories.each do |directory|
raise ArgumentError, "#{directory} does not exist" unless Dir.exist?(directory)
end
HTMLProofer::Runner.new(directories, options)
end
|
.check_directory(directory, options = {}) ⇒ Object
35
36
37
38
39
40
41
|
# File 'lib/html_proofer.rb', line 35
def check_directory(directory, options = {})
raise ArgumentError unless directory.is_a?(String)
raise ArgumentError, "#{directory} does not exist" unless Dir.exist?(directory)
options[:type] = :directory
HTMLProofer::Runner.new([directory], options)
end
|
.check_file(file, options = {}) ⇒ Object
27
28
29
30
31
32
33
|
# File 'lib/html_proofer.rb', line 27
def check_file(file, options = {})
raise ArgumentError, "File isn't a string" unless file.is_a?(String)
raise ArgumentError, "#{file} does not exist" unless File.exist?(file)
options[:type] = :file
HTMLProofer::Runner.new(file, options)
end
|
.check_links(links, options = {}) ⇒ Object
53
54
55
56
57
58
|
# File 'lib/html_proofer.rb', line 53
def check_links(links, options = {})
raise ArgumentError unless links.is_a?(Array)
options[:type] = :links
HTMLProofer::Runner.new(links, options)
end
|