Class: Moult::BoundariesReport::Finding
- Inherits:
-
Struct
- Object
- Struct
- Moult::BoundariesReport::Finding
- Defined in:
- lib/moult/boundaries_report.rb
Overview
One recorded boundary-violation group: a (referencing_package, defining_package, constant, violation_type) tuple referenced from one or more files. Carries its severity and reasons so the classification is auditable.
Instance Attribute Summary collapse
-
#constant ⇒ Object
Returns the value of attribute constant.
-
#defining_package ⇒ Object
Returns the value of attribute defining_package.
-
#occurrences ⇒ Object
Returns the value of attribute occurrences.
-
#reasons ⇒ Object
Returns the value of attribute reasons.
-
#referencing_package ⇒ Object
Returns the value of attribute referencing_package.
-
#severity ⇒ Object
Returns the value of attribute severity.
-
#violation_type ⇒ Object
Returns the value of attribute violation_type.
Instance Method Summary collapse
Instance Attribute Details
#constant ⇒ Object
Returns the value of attribute constant
32 33 34 |
# File 'lib/moult/boundaries_report.rb', line 32 def constant @constant end |
#defining_package ⇒ Object
Returns the value of attribute defining_package
32 33 34 |
# File 'lib/moult/boundaries_report.rb', line 32 def defining_package @defining_package end |
#occurrences ⇒ Object
Returns the value of attribute occurrences
32 33 34 |
# File 'lib/moult/boundaries_report.rb', line 32 def occurrences @occurrences end |
#reasons ⇒ Object
Returns the value of attribute reasons
32 33 34 |
# File 'lib/moult/boundaries_report.rb', line 32 def reasons @reasons end |
#referencing_package ⇒ Object
Returns the value of attribute referencing_package
32 33 34 |
# File 'lib/moult/boundaries_report.rb', line 32 def referencing_package @referencing_package end |
#severity ⇒ Object
Returns the value of attribute severity
32 33 34 |
# File 'lib/moult/boundaries_report.rb', line 32 def severity @severity end |
#violation_type ⇒ Object
Returns the value of attribute violation_type
32 33 34 |
# File 'lib/moult/boundaries_report.rb', line 32 def violation_type @violation_type end |
Instance Method Details
#to_h ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/moult/boundaries_report.rb', line 34 def to_h { category: Boundaries::Severity::CATEGORY, confidence: nil, violation_type: violation_type, severity: severity, referencing_package: referencing_package, defining_package: defining_package, constant: constant, reasons: reasons.map(&:to_h), occurrences: occurrences.map(&:to_h) } end |