Class: SuperDiff::Basic::OperationTreeBuilders::Array
Defined Under Namespace
Classes: LcsCallbacks
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.applies_to?(expected, actual) ⇒ Boolean
9
10
11
|
# File 'lib/super_diff/basic/operation_tree_builders/array.rb', line 9
def self.applies_to?(expected, actual)
expected.is_a?(::Array) && actual.is_a?(::Array)
end
|
Instance Method Details
#call ⇒ Object
13
14
15
16
|
# File 'lib/super_diff/basic/operation_tree_builders/array.rb', line 13
def call
Diff::LCS.traverse_balanced(expected, actual, lcs_callbacks)
operation_tree
end
|
#operation_tree ⇒ Object
30
31
32
|
# File 'lib/super_diff/basic/operation_tree_builders/array.rb', line 30
def operation_tree
@operation_tree ||= OperationTrees::Array.new([])
end
|