Class: TurnKit::OutputAudit::Result
- Inherits:
-
Struct
- Object
- Struct
- TurnKit::OutputAudit::Result
- Defined in:
- lib/turnkit/output_audit.rb
Instance Attribute Summary collapse
-
#violations ⇒ Object
Returns the value of attribute violations.
Instance Method Summary collapse
Instance Attribute Details
#violations ⇒ Object
Returns the value of attribute violations
11 12 13 |
# File 'lib/turnkit/output_audit.rb', line 11 def violations @violations end |
Instance Method Details
#clean? ⇒ Boolean
12 13 14 |
# File 'lib/turnkit/output_audit.rb', line 12 def clean? violations.empty? end |
#messages ⇒ Object
16 17 18 |
# File 'lib/turnkit/output_audit.rb', line 16 def violations.map(&:message) end |
#to_h ⇒ Object
20 21 22 |
# File 'lib/turnkit/output_audit.rb', line 20 def to_h { "clean" => clean?, "violations" => violations.map(&:to_h) } end |