Class: Axe::API::Results::CheckedNode

Inherits:
Node show all
Defined in:
lib/axe/api/results/checked_node.rb

Constant Summary

Constants inherited from ValueObject

ValueObject::BOOLEAN_FALSE_STRINGS, ValueObject::BOOLEAN_TRUE_STRINGS

Instance Method Summary collapse

Methods inherited from ValueObject

#==, #[], attribute, attributes, #attributes, #hash, #initialize, #inspect, #to_hash, values

Constructor Details

This class inherits a constructor from Axe::API::ValueObject

Instance Method Details

#failure_messagesObject



18
19
20
21
22
23
24
25
# File 'lib/axe/api/results/checked_node.rb', line 18

def failure_messages
  [
    super,
    fix(all, "Fix all of the following:"),
    fix(none, "Fix all of the following:"),
    fix(any, "Fix any of the following:"),
  ]
end

#to_hObject



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/axe/api/results/checked_node.rb', line 27

def to_h
  {
    all: all.map(&:to_h),
    any: any.map(&:to_h),
    failureSummary: failureSummary,
    html: html,
    impact: impact,
    none: none.map(&:to_h),
    target: target,
  }
end