Class: SuperDiff::OperationTrees::CustomObject
Instance Attribute Summary
#value_class
Class Method Summary
collapse
Instance Method Summary
collapse
#initialize
Methods inherited from Base
#pretty_print
Class Method Details
.applies_to?(value) ⇒ Boolean
4
5
6
|
# File 'lib/super_diff/operation_trees/custom_object.rb', line 4
def self.applies_to?(value)
value.respond_to?(:attributes_for_super_diff)
end
|
Instance Method Details
#to_diff(indent_level:, add_comma: false, collection_prefix: nil) ⇒ Object
8
9
10
11
12
13
14
15
16
|
# File 'lib/super_diff/operation_trees/custom_object.rb', line 8
def to_diff(indent_level:, add_comma: false, collection_prefix: nil)
DiffFormatters::CustomObject.call(
self,
indent_level: indent_level,
collection_prefix: collection_prefix,
add_comma: add_comma,
value_class: value_class,
)
end
|