Class: Axe::API::Audit
- Inherits:
-
Object
- Object
- Axe::API::Audit
- Defined in:
- lib/axe/api/audit.rb
Instance Attribute Summary collapse
-
#invocation ⇒ Object
readonly
Returns the value of attribute invocation.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object
-
#initialize(invocation, results) ⇒ Audit
constructor
A new instance of Audit.
- #passed? ⇒ Boolean
Constructor Details
#initialize(invocation, results) ⇒ Audit
Returns a new instance of Audit.
6 7 8 9 |
# File 'lib/axe/api/audit.rb', line 6 def initialize(invocation, results) @invocation = invocation @results = results end |
Instance Attribute Details
#invocation ⇒ Object (readonly)
Returns the value of attribute invocation.
4 5 6 |
# File 'lib/axe/api/audit.rb', line 4 def invocation @invocation end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
4 5 6 |
# File 'lib/axe/api/audit.rb', line 4 def results @results end |
Instance Method Details
#failure_message ⇒ Object
15 16 17 |
# File 'lib/axe/api/audit.rb', line 15 def "#{results.}\nInvocation: #{invocation}" end |
#failure_message_when_negated ⇒ Object
19 20 21 |
# File 'lib/axe/api/audit.rb', line 19 def "Expected to find accessibility violations. None were detected.\n\nInvocation: #{invocation}" end |
#passed? ⇒ Boolean
11 12 13 |
# File 'lib/axe/api/audit.rb', line 11 def passed? results.violations.count == 0 end |