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



6
7
8
9
# File 'lib/nanoc/extra/validators/links.rb', line 6

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



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

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