Class: LinkCheckable

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

Constant Summary

Constants included from HTML::Proofer::Utils

HTML::Proofer::Utils::STORAGE_DIR

Instance Attribute Summary

Attributes inherited from HTML::Proofer::Checkable

#line

Instance Method Summary collapse

Methods inherited from HTML::Proofer::Checkable

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

Methods included from HTML::Proofer::Utils

clean_content, create_nokogiri, #pluralize, swap

Constructor Details

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

Instance Method Details

#hrefObject



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

def href
  real_attr @href
end

#idObject



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

def id
  real_attr @id
end

#missing_href?Boolean

Returns:

  • (Boolean)


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

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

#nameObject



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

def name
  real_attr @name
end

#placeholder?Boolean

Returns:

  • (Boolean)


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

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