Class: BBCMobileStandards::HTMLValidator

Inherits:
Object
  • Object
show all
Includes:
W3CValidators
Defined in:
lib/bbc_mobile_standards/html_validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ HTMLValidator

Returns a new instance of HTMLValidator.



9
10
11
12
13
# File 'lib/bbc_mobile_standards/html_validator.rb', line 9

def initialize(html)
  @html = html
  @errors = []
  w3c_validate_html
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



5
6
7
# File 'lib/bbc_mobile_standards/html_validator.rb', line 5

def errors
  @errors
end

#validObject (readonly)

Returns the value of attribute valid.



5
6
7
# File 'lib/bbc_mobile_standards/html_validator.rb', line 5

def valid
  @valid
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/bbc_mobile_standards/html_validator.rb', line 15

def valid?
  self.valid
end