Class: ScriptCheckable

Inherits:
HTML::Proofer::Checkable show all
Defined in:
lib/html/proofer/checks/scripts.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

#blank?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/html/proofer/checks/scripts.rb', line 13

def blank?
  @text.strip.empty?
end

#missing_src?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/html/proofer/checks/scripts.rb', line 9

def missing_src?
  !src
end

#srcObject



5
6
7
# File 'lib/html/proofer/checks/scripts.rb', line 5

def src
  real_attr @src
end