-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract ldiff display logic to reuse it as lib
The ldiff "display" logic was too tightly coupled with the command line program. Let's just extract it in a distinct class method accepting all the necessary parameters. One can now use Diff::LCS::Ldiff.diff?( Diff::LCS::Ldiff::InputInfo.new('file1'), Diff::LCS::Ldiff::InputInfo.new('file2'), :unified, # or :ed or :context or :report $stdout, # or a ref to [] or to a StringIO or a File binary: nil, # or true or false if you want to be explicit lines: 3) # to customize the number of context lines The result will be `true` in case of diff and `false` otherwise. The output if any, will be appended to the output parameter.
- Loading branch information
Showing
1 changed file
with
33 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters