Class: BBC::A11y::Configuration::PageSettings
- Inherits:
-
Object
- Object
- BBC::A11y::Configuration::PageSettings
- Defined in:
- lib/bbc/a11y/configuration.rb
Instance Attribute Summary collapse
-
#skipped_standards ⇒ Object
readonly
Returns the value of attribute skipped_standards.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, skipped_standards = []) ⇒ PageSettings
constructor
A new instance of PageSettings.
- #merge(other) ⇒ Object
- #skip_standard?(standard) ⇒ Boolean
Constructor Details
#initialize(url, skipped_standards = []) ⇒ PageSettings
Returns a new instance of PageSettings.
78 79 80 81 82 |
# File 'lib/bbc/a11y/configuration.rb', line 78 def initialize(url, skipped_standards=[]) @url = url @skipped_standards = skipped_standards freeze end |
Instance Attribute Details
#skipped_standards ⇒ Object (readonly)
Returns the value of attribute skipped_standards.
76 77 78 |
# File 'lib/bbc/a11y/configuration.rb', line 76 def skipped_standards @skipped_standards end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
75 76 77 |
# File 'lib/bbc/a11y/configuration.rb', line 75 def url @url end |
Instance Method Details
#merge(other) ⇒ Object
84 85 86 |
# File 'lib/bbc/a11y/configuration.rb', line 84 def merge(other) self.class.new(url, skipped_standards + other.skipped_standards) end |
#skip_standard?(standard) ⇒ Boolean
88 89 90 91 92 |
# File 'lib/bbc/a11y/configuration.rb', line 88 def skip_standard?(standard) @skipped_standards.any? { |pattern| pattern.match(standard.name) } end |