Class: Axe::API::Results::Rule
- Inherits:
-
ValueObject
- Object
- ValueObject
- Axe::API::Results::Rule
- Defined in:
- lib/axe/api/results/rule.rb
Instance Method Summary collapse
Instance Method Details
#failure_messages(index) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/axe/api/results/rule.rb', line 18 def (index) [ (index + 1), *[ helpUrl, , "", nodes.reject { |n| n.nil? }.map(&:failure_messages).map { |n| n.push("") }.flatten.map(&indent), ].flatten.map(&indent), ] end |
#to_h ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/axe/api/results/rule.rb', line 30 def to_h { description: description, help: help, helpUrl: helpUrl, id: id, impact: impact, nodes: nodes.map(&:to_h), tags: , } end |