Class: Herb::DiffOperation
- Inherits:
-
Data
- Object
- Data
- Herb::DiffOperation
- Defined in:
- lib/herb/diff_operation.rb,
lib/herb/diff_operation.rb
Instance Attribute Summary collapse
-
#new_index ⇒ Object
readonly
Returns the value of attribute new_index.
-
#new_node ⇒ Object
readonly
Returns the value of attribute new_node.
-
#old_index ⇒ Object
readonly
Returns the value of attribute old_index.
-
#old_node ⇒ Object
readonly
Returns the value of attribute old_node.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#inspect ⇒ Object
: () -> String.
-
#to_hash ⇒ Object
(also: #to_h)
: () -> Hash[Symbol, untyped].
Instance Attribute Details
#new_index ⇒ Object (readonly)
Returns the value of attribute new_index
5 6 7 |
# File 'lib/herb/diff_operation.rb', line 5 def new_index @new_index end |
#new_node ⇒ Object (readonly)
Returns the value of attribute new_node
5 6 7 |
# File 'lib/herb/diff_operation.rb', line 5 def new_node @new_node end |
#old_index ⇒ Object (readonly)
Returns the value of attribute old_index
5 6 7 |
# File 'lib/herb/diff_operation.rb', line 5 def old_index @old_index end |
#old_node ⇒ Object (readonly)
Returns the value of attribute old_node
5 6 7 |
# File 'lib/herb/diff_operation.rb', line 5 def old_node @old_node end |
#path ⇒ Object (readonly)
Returns the value of attribute path
5 6 7 |
# File 'lib/herb/diff_operation.rb', line 5 def path @path end |
#type ⇒ Object (readonly)
Returns the value of attribute type
5 6 7 |
# File 'lib/herb/diff_operation.rb', line 5 def type @type end |
Instance Method Details
#inspect ⇒ Object
: () -> String
30 31 32 |
# File 'lib/herb/diff_operation.rb', line 30 def inspect "#<#{self.class.name} type=#{type} path=[#{path.join(", ")}]>" end |
#to_hash ⇒ Object Also known as: to_h
: () -> Hash[Symbol, untyped]
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/herb/diff_operation.rb', line 16 def to_hash { type: type, path: path, old_node: old_node, new_node: new_node, old_index: old_index, new_index: new_index, } end |