Class: Uniword::Diff::XmlChange
- Inherits:
-
Object
- Object
- Uniword::Diff::XmlChange
- Defined in:
- lib/uniword/diff/package_diff_result.rb
Overview
Value object holding a single XML change within a part.
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.
Instance Method Summary collapse
-
#initialize(part:, category:, description:) ⇒ XmlChange
constructor
A new instance of XmlChange.
- #to_h ⇒ Object
Constructor Details
#initialize(part:, category:, description:) ⇒ XmlChange
Returns a new instance of XmlChange.
11 12 13 14 15 |
# File 'lib/uniword/diff/package_diff_result.rb', line 11 def initialize(part:, category:, description:) @part = part @category = category @description = description end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
9 10 11 |
# File 'lib/uniword/diff/package_diff_result.rb', line 9 def category @category end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
9 10 11 |
# File 'lib/uniword/diff/package_diff_result.rb', line 9 def description @description end |
#part ⇒ Object (readonly)
Returns the value of attribute part.
9 10 11 |
# File 'lib/uniword/diff/package_diff_result.rb', line 9 def part @part end |
Instance Method Details
#to_h ⇒ Object
17 18 19 20 |
# File 'lib/uniword/diff/package_diff_result.rb', line 17 def to_h { part: @part, category: @category.to_s, description: @description } end |