Class: PaperTrailDiff::ValueChange
- Inherits:
-
Object
- Object
- PaperTrailDiff::ValueChange
- Defined in:
- lib/paper_trail_diff/value_objects.rb,
sig/generated/paper_trail_diff/value_objects.rbs
Overview
A directional change between two structured values.
Instance Attribute Summary collapse
- #from ⇒ Object readonly
- #to ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(from:, to:) ⇒ ValueChange
constructor
: (from: untyped, to: untyped) -> void.
-
#to_h ⇒ Hash[Symbol, untyped]
: () -> Hash[Symbol, untyped].
Constructor Details
#initialize(from:, to:) ⇒ ValueChange
: (from: untyped, to: untyped) -> void
11 12 13 14 15 |
# File 'lib/paper_trail_diff/value_objects.rb', line 11 def initialize(from:, to:) @from = Support.immutable_copy(from) @to = Support.immutable_copy(to) freeze end |
Instance Attribute Details
#from ⇒ Object (readonly)
7 8 9 |
# File 'lib/paper_trail_diff/value_objects.rb', line 7 def from @from end |
#to ⇒ Object (readonly)
8 9 10 |
# File 'lib/paper_trail_diff/value_objects.rb', line 8 def to @to end |