Class: LinkCheckable

Inherits:
HTML::Proofer::Checkable show all
Defined in:
lib/html/proofer/checks/links.rb

Instance Attribute Summary

Attributes inherited from HTML::Proofer::Checkable

#line

Instance Method Summary collapse

Methods inherited from HTML::Proofer::Checkable

#absolute_path, #exists?, #external?, #file_path, #follow_location?, #hash, #ignore?, #ignores_pattern_check, #initialize, #internal?, #non_http_remote?, #parts, #path, #remote?, #scheme, #unslashed_directory?, #url, #valid?

Methods included from HTML::Utils

create_nokogiri, swap

Constructor Details

This class inherits a constructor from HTML::Proofer::Checkable

Instance Method Details

#hrefObject



4
5
6
# File 'lib/html/proofer/checks/links.rb', line 4

def href
  real_attr @href
end

#idObject



8
9
10
# File 'lib/html/proofer/checks/links.rb', line 8

def id
  real_attr @id
end

#missing_href?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/html/proofer/checks/links.rb', line 16

def missing_href?
  href.nil? && name.nil? && id.nil?
end

#nameObject



12
13
14
# File 'lib/html/proofer/checks/links.rb', line 12

def name
  real_attr @name
end

#placeholder?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/html/proofer/checks/links.rb', line 20

def placeholder?
  (id || name) && href.nil?
end