Class: OpenGraphElement
- Inherits:
-
HTMLProofer::Element
- Object
- HTMLProofer::Element
- OpenGraphElement
- Defined in:
- lib/html-proofer/check/opengraph.rb
Instance Attribute Summary collapse
-
#src ⇒ Object
readonly
Returns the value of attribute src.
Attributes inherited from HTMLProofer::Element
#alt, #data_proofer_ignore, #href, #id, #line, #link, #name
Instance Method Summary collapse
-
#initialize(obj, check, logger) ⇒ OpenGraphElement
constructor
A new instance of OpenGraphElement.
Methods inherited from HTMLProofer::Element
#absolute_path, #allow_hash_href?, #allow_missing_href?, #base, #check_img_http?, #check_sri?, #exists?, #external?, #file_path, #follow_location?, #hash, #hash_link, #html, #ignore?, #ignore_alt?, #ignore_empty_alt?, #ignores_pattern_check, #internal?, #internal_absolute_link?, #link_points_to_same_page?, #non_http_remote?, #param_link, #parts, #path, #relative_link?, #remote?, #scheme, #unslashed_directory?, #url, #valid?
Methods included from HTMLProofer::Utils
#create_nokogiri, #pluralize, #swap
Constructor Details
#initialize(obj, check, logger) ⇒ OpenGraphElement
Returns a new instance of OpenGraphElement.
6 7 8 9 10 11 12 |
# File 'lib/html-proofer/check/opengraph.rb', line 6 def initialize(obj, check, logger) super(obj, check, logger) # Fake up src from the content attribute instance_variable_set('@src', @content) @src.insert 0, 'http:' if @src =~ %r{^//} end |
Instance Attribute Details
#src ⇒ Object (readonly)
Returns the value of attribute src.
4 5 6 |
# File 'lib/html-proofer/check/opengraph.rb', line 4 def src @src end |