Class: Uniword::Diff::XmlChange

Inherits:
Object
  • Object
show all
Defined in:
lib/uniword/diff/package_diff_result.rb

Overview

Value object holding a single XML change within a part.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#categoryObject (readonly)

Returns the value of attribute category.



9
10
11
# File 'lib/uniword/diff/package_diff_result.rb', line 9

def category
  @category
end

#descriptionObject (readonly)

Returns the value of attribute description.



9
10
11
# File 'lib/uniword/diff/package_diff_result.rb', line 9

def description
  @description
end

#partObject (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_hObject



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