Class: Image
Constant Summary
collapse
- SCREEN_SHOT_REGEX =
/Screen(?: |%20)Shot(?: |%20)\d+-\d+-\d+(?: |%20)at(?: |%20)\d+.\d+.\d+/
Instance Method Summary
collapse
#absolute_path, #exists?, #external?, #file_path, #hash, #ignore?, #ignores_pattern_check, #initialize, #internal?, #parts, #path, #remote?, #scheme, #unslashed_directory?, #url, #valid?
Instance Method Details
#missing_src? ⇒ Boolean
19
20
21
|
# File 'lib/html/proofer/checks/images.rb', line 19
def missing_src?
!src
end
|
#src ⇒ Object
15
16
17
|
# File 'lib/html/proofer/checks/images.rb', line 15
def src
@src unless @src.nil? || @src.empty?
end
|
#terrible_filename? ⇒ Boolean
11
12
13
|
# File 'lib/html/proofer/checks/images.rb', line 11
def terrible_filename?
@src =~ SCREEN_SHOT_REGEX
end
|
#valid_alt_tag? ⇒ Boolean
7
8
9
|
# File 'lib/html/proofer/checks/images.rb', line 7
def valid_alt_tag?
@alt and !@alt.empty?
end
|