Class: SuperDiff::Basic::OperationTrees::DefaultObject
- Inherits:
-
Core::AbstractOperationTree
- Object
- Core::AbstractOperationTree
- SuperDiff::Basic::OperationTrees::DefaultObject
- Defined in:
- lib/super_diff/basic/operation_trees/default_object.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#underlying_object ⇒ Object
readonly
Returns the value of attribute underlying_object.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(operations, underlying_object:) ⇒ DefaultObject
constructor
A new instance of DefaultObject.
- #pretty_print(pp) ⇒ Object
Methods inherited from Core::AbstractOperationTree
#==, #flatten, #perhaps_elide, #to_diff
Constructor Details
#initialize(operations, underlying_object:) ⇒ DefaultObject
Returns a new instance of DefaultObject.
13 14 15 16 |
# File 'lib/super_diff/basic/operation_trees/default_object.rb', line 13 def initialize(operations, underlying_object:) super(operations) @underlying_object = end |
Instance Attribute Details
#underlying_object ⇒ Object (readonly)
Returns the value of attribute underlying_object.
11 12 13 |
# File 'lib/super_diff/basic/operation_trees/default_object.rb', line 11 def @underlying_object end |
Class Method Details
.applies_to? ⇒ Boolean
7 8 9 |
# File 'lib/super_diff/basic/operation_trees/default_object.rb', line 7 def self.applies_to?(*) true end |
Instance Method Details
#pretty_print(pp) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/super_diff/basic/operation_trees/default_object.rb', line 18 def pretty_print(pp) pp.text "#<#{self.class.name} " pp.nest(1) do pp.breakable pp.text ':operations=>' pp.group(1, '[', ']') do pp.breakable pp.seplist(self) { |value| pp.pp value } end pp.comma_breakable pp.text ':underlying_object=>' pp.object_address_group do # do nothing end end pp.text '>' end |