Class: SuperDiff::OperationalSequencers::CustomObject
Class Method Summary
collapse
Instance Method Summary
collapse
#initialize
Methods inherited from Base
#call
Class Method Details
.applies_to?(expected, actual) ⇒ Boolean
4
5
6
7
8
|
# File 'lib/super_diff/operational_sequencers/custom_object.rb', line 4
def self.applies_to?(expected, actual)
expected.class == actual.class &&
expected.respond_to?(:attributes_for_super_diff) &&
actual.respond_to?(:attributes_for_super_diff)
end
|
Instance Method Details
#attribute_names ⇒ Object
15
16
17
18
|
# File 'lib/super_diff/operational_sequencers/custom_object.rb', line 15
def attribute_names
expected.attributes_for_super_diff.keys &
actual.attributes_for_super_diff.keys
end
|
#build_operation_sequencer ⇒ Object
10
11
12
13
|
# File 'lib/super_diff/operational_sequencers/custom_object.rb', line 10
def build_operation_sequencer
OperationSequences::CustomObject.new([], value_class: expected.class)
end
|