Method: HTMLProofer.check_file

Defined in:
lib/html_proofer.rb

.check_file(file, options = {}) ⇒ Object

Raises:

  • (ArgumentError)

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