Class: Uniword::Diff::OpcIssue
- Inherits:
-
Object
- Object
- Uniword::Diff::OpcIssue
- Defined in:
- lib/uniword/diff/package_diff_result.rb
Overview
Value object holding an OPC (Open Packaging Convention) validation issue.
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#part ⇒ Object
readonly
Returns the value of attribute part.
-
#severity ⇒ Object
readonly
Returns the value of attribute severity.
Instance Method Summary collapse
-
#initialize(part:, severity:, category:, description:) ⇒ OpcIssue
constructor
A new instance of OpcIssue.
- #to_h ⇒ Object
Constructor Details
#initialize(part:, severity:, category:, description:) ⇒ OpcIssue
Returns a new instance of OpcIssue.
53 54 55 56 57 58 |
# File 'lib/uniword/diff/package_diff_result.rb', line 53 def initialize(part:, severity:, category:, description:) @part = part @severity = severity @category = category @description = description end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
46 47 48 |
# File 'lib/uniword/diff/package_diff_result.rb', line 46 def category @category end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
46 47 48 |
# File 'lib/uniword/diff/package_diff_result.rb', line 46 def description @description end |
#part ⇒ Object (readonly)
Returns the value of attribute part.
46 47 48 |
# File 'lib/uniword/diff/package_diff_result.rb', line 46 def part @part end |
#severity ⇒ Object (readonly)
Returns the value of attribute severity.
46 47 48 |
# File 'lib/uniword/diff/package_diff_result.rb', line 46 def severity @severity end |
Instance Method Details
#to_h ⇒ Object
60 61 62 63 |
# File 'lib/uniword/diff/package_diff_result.rb', line 60 def to_h { part: @part, severity: @severity.to_s, category: @category.to_s, description: @description } end |