Class: SiteHealth::HTMLProoferConfiguration
- Inherits:
-
Object
- Object
- SiteHealth::HTMLProoferConfiguration
- Defined in:
- lib/site_health/configuration/html_proofer_configuration.rb
Overview
Holds HTMLProofer configuration data
Constant Summary collapse
- LOG_LEVELS =
Valid log levels
%i[ debug info warn error fatal ].freeze
- ERROR_SORTS =
Valid error sorts
%i[path desc status].freeze
Instance Attribute Summary collapse
-
#assume_extension ⇒ Object
Returns the value of attribute assume_extension.
-
#check_external_hash ⇒ Object
Returns the value of attribute check_external_hash.
-
#check_favicon ⇒ Object
Returns the value of attribute check_favicon.
-
#check_html ⇒ Object
Returns the value of attribute check_html.
-
#check_img_http ⇒ Object
Returns the value of attribute check_img_http.
-
#check_opengraph ⇒ Object
Returns the value of attribute check_opengraph.
-
#empty_alt_ignore ⇒ Object
Returns the value of attribute empty_alt_ignore.
-
#enforce_https ⇒ Object
Returns the value of attribute enforce_https.
-
#error_sort ⇒ Object
Returns the value of attribute error_sort.
-
#ignore_missing_internal_links ⇒ Object
Returns the value of attribute ignore_missing_internal_links.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#report_invalid_tags ⇒ Object
Returns the value of attribute report_invalid_tags.
-
#report_missing_names ⇒ Object
Returns the value of attribute report_missing_names.
Instance Method Summary collapse
-
#initialize ⇒ HTMLProoferConfiguration
constructor
A new instance of HTMLProoferConfiguration.
-
#to_h ⇒ Hash
Config as hash, only contains keys for ::HTMLProofer config.
Constructor Details
#initialize ⇒ HTMLProoferConfiguration
Returns a new instance of HTMLProoferConfiguration.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 32 def initialize @log_level = :fatal @check_opengraph = true @check_html = true @check_external_hash = true @check_img_http = false @empty_alt_ignore = false @error_sort = :path @enforce_https = false @assume_extension = true @report_missing_names = true @report_invalid_tags = true @check_favicon = true @ignore_missing_internal_links = true end |
Instance Attribute Details
#assume_extension ⇒ Object
Returns the value of attribute assume_extension.
8 9 10 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 8 def assume_extension @assume_extension end |
#check_external_hash ⇒ Object
Returns the value of attribute check_external_hash.
8 9 10 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 8 def check_external_hash @check_external_hash end |
#check_favicon ⇒ Object
Returns the value of attribute check_favicon.
8 9 10 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 8 def check_favicon @check_favicon end |
#check_html ⇒ Object
Returns the value of attribute check_html.
8 9 10 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 8 def check_html @check_html end |
#check_img_http ⇒ Object
Returns the value of attribute check_img_http.
8 9 10 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 8 def check_img_http @check_img_http end |
#check_opengraph ⇒ Object
Returns the value of attribute check_opengraph.
8 9 10 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 8 def check_opengraph @check_opengraph end |
#empty_alt_ignore ⇒ Object
Returns the value of attribute empty_alt_ignore.
8 9 10 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 8 def empty_alt_ignore @empty_alt_ignore end |
#enforce_https ⇒ Object
Returns the value of attribute enforce_https.
8 9 10 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 8 def enforce_https @enforce_https end |
#error_sort ⇒ Object
Returns the value of attribute error_sort.
6 7 8 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 6 def error_sort @error_sort end |
#ignore_missing_internal_links ⇒ Object
Returns the value of attribute ignore_missing_internal_links.
8 9 10 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 8 def ignore_missing_internal_links @ignore_missing_internal_links end |
#log_level ⇒ Object
Returns the value of attribute log_level.
6 7 8 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 6 def log_level @log_level end |
#report_invalid_tags ⇒ Object
Returns the value of attribute report_invalid_tags.
8 9 10 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 8 def @report_invalid_tags end |
#report_missing_names ⇒ Object
Returns the value of attribute report_missing_names.
8 9 10 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 8 def report_missing_names @report_missing_names end |
Instance Method Details
#to_h ⇒ Hash
Returns config as hash, only contains keys for ::HTMLProofer config.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/site_health/configuration/html_proofer_configuration.rb', line 71 def to_h { log_level: log_level, check_opengraph: check_opengraph, check_html: check_html, check_external_hash: check_external_hash, empty_alt_ignore: empty_alt_ignore, check_img_http: check_img_http, error_sort: error_sort, enforce_https: enforce_https, assume_extension: assume_extension, report_missing_names: report_missing_names, report_invalid_tags: , check_favicon: check_favicon, } end |