--- !ruby/object:RI::ClassDescription 
attributes: 
- !ruby/object:RI::Attribute 
  comment: 
  - !ruby/struct:SM::Flow::P 
    body: Returns the difference set collected during the diff process.
  name: diffs
  rw: R
class_methods: 
- !ruby/object:RI::MethodSummary 
  name: new
comment: 
- !ruby/struct:SM::Flow::P 
  body: "This will produce a compound array of simple diff change objects. Each element in the #diffs array is a <tt>hunk</tt> or <tt>hunk</tt> array, where each element in each <tt>hunk</tt> array is a single Change object representing the addition or removal of a single element from one of the two tested sequences. The <tt>hunk</tt> provides the full context for the changes."
- !ruby/struct:SM::Flow::VERB 
  body: "    diffs = Diff::LCS.diff(seq1, seq2)\n      # This example shows a simplified array format.\n      # [ [ [ '-',  0, 'a' ] ],   # 1\n      #   [ [ '+',  2, 'd' ] ],   # 2\n      #   [ [ '-',  4, 'h' ],     # 3\n      #     [ '+',  4, 'f' ] ],\n      #   [ [ '+',  6, 'k' ] ],   # 4\n      #   [ [ '-',  8, 'n' ],     # 5\n      #     [ '-',  9, 'p' ],\n      #     [ '+',  9, 'r' ],\n      #     [ '+', 10, 's' ],\n      #     [ '+', 11, 't' ] ] ]\n"
- !ruby/struct:SM::Flow::P 
  body: There are five hunks here. The first hunk says that the <tt>a</tt> at position 0 of the first sequence should be deleted (<tt>'-'</tt>). The second hunk says that the <tt>d</tt> at position 2 of the second sequence should be inserted (<tt>'+'</tt>). The third hunk says that the <tt>h</tt> at position 4 of the first sequence should be removed and replaced with the <tt>f</tt> from position 4 of the second sequence. The other two hunks are described similarly.
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Use
- !ruby/struct:SM::Flow::P 
  body: This callback object must be initialised and is used by the Diff::LCS#diff method.
- !ruby/struct:SM::Flow::VERB 
  body: "    cbo = Diff::LCS::DiffCallbacks.new\n    Diff::LCS.LCS(seq1, seq2, cbo)\n    cbo.finish\n"
- !ruby/struct:SM::Flow::P 
  body: "Note that the call to #finish is absolutely necessary, or the last set of changes will not be visible. Alternatively, can be used as:"
- !ruby/struct:SM::Flow::VERB 
  body: "    cbo = Diff::LCS::DiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) }\n"
- !ruby/struct:SM::Flow::P 
  body: "The necessary #finish call will be made."
- !ruby/struct:SM::Flow::H 
  level: 3
  text: Simplified Array Format
- !ruby/struct:SM::Flow::P 
  body: "The simplified array format used in the example above can be obtained with:"
- !ruby/struct:SM::Flow::VERB 
  body: "    require 'pp'\n    pp diffs.map { |e| e.map { |f| f.to_a } }\n"
constants: []

full_name: Diff::LCS::DiffCallbacks
includes: []

instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: discard_a
- !ruby/object:RI::MethodSummary 
  name: discard_b
- !ruby/object:RI::MethodSummary 
  name: finish
- !ruby/object:RI::MethodSummary 
  name: match
name: DiffCallbacks
superclass: Object
