Class: BBCMobileStandards::AccessibilityValidator
- Inherits:
-
Object
- Object
- BBCMobileStandards::AccessibilityValidator
- Defined in:
- lib/bbc_mobile_standards/accessibility_validator.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(html_string) ⇒ AccessibilityValidator
constructor
A new instance of AccessibilityValidator.
- #valid? ⇒ Boolean
Constructor Details
#initialize(html_string) ⇒ AccessibilityValidator
Returns a new instance of AccessibilityValidator.
6 7 8 9 10 11 |
# File 'lib/bbc_mobile_standards/accessibility_validator.rb', line 6 def initialize(html_string) @html_string = html_string @page = Nokogiri::HTML(@html_string) @errors = [] validate_page end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
4 5 6 |
# File 'lib/bbc_mobile_standards/accessibility_validator.rb', line 4 def errors @errors end |
Instance Method Details
#valid? ⇒ Boolean
13 14 15 |
# File 'lib/bbc_mobile_standards/accessibility_validator.rb', line 13 def valid? true unless @errors.size > 0 end |