Class: Nanoc::Extra::Validators::Links Deprecated

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc/extra/validators/links.rb

Overview

Deprecated.

Use the Checking API or the check command instead

Instance Method Summary (collapse)

Constructor Details

- (Links) initialize(dir, index_filenames, params = {})

Returns a new instance of Links



8
9
10
11
# File 'lib/nanoc/extra/validators/links.rb', line 8

def initialize(dir, index_filenames, params = {})
  @include_internal = params.key?(:internal) && params[:internal]
  @include_external = params.key?(:external) && params[:external]
end

Instance Method Details

- (Object) run



13
14
15
16
17
18
# File 'lib/nanoc/extra/validators/links.rb', line 13

def run
  checks = []
  checks << 'ilinks' if options[:internal]
  checks << 'elinks' if options[:external]
  Nanoc::CLI.run [ 'check', checks ].flatten
end