Parent

Methods

Class/Module Index [+]

Quicksearch

Nanoc::Extra::Validators::W3C

@deprecated Use the Checking API or the `check` command instead

Public Class Methods

new(dir, types) click to toggle source
# File lib/nanoc/extra/validators/w3c.rb, line 7
def initialize(dir, types)
  @dir   = dir
  @types = types
end

Public Instance Methods

run() click to toggle source
# File lib/nanoc/extra/validators/w3c.rb, line 12
def run
  args = []
  types = @types.dup
  args << 'html' if types.delete(:html)
  args << 'css'  if types.delete(:css)
  unless types.empty?
    raise Nanoc::Errors::GenericTrivial, "unknown type(s) specified: #{types.join(', ')}"
  end

  Nanoc::CLI.run([ 'check', args ].flatten)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.