class Diff::LCS::HTMLDiff::Callbacks

def discard_a(event)

This will be called when there is a line in A that isn't in B
def discard_a(event)
  @output << htmlize(event.old_element, :only_a_class)
end

def discard_b(event)

This will be called when there is a line in B that isn't in A
def discard_b(event)
  @output << htmlize(event.new_element, :only_b_class)
end

def htmlize(element, css_class)

def htmlize(element, css_class)
  element = "&nbsp;" if element.empty?
  %Q|<pre class="#{__send__(css_class)}">#{element}</pre>\n|
end

def initialize(output, options = {})

def initialize(output, options = {})
  @output = output
  options ||= {}
  @match_class = options[:match_class] || "match"
  @only_a_class = options[:only_a_class] || "only_a"
  @only_b_class = options[:only_b_class] || "only_b"
end

def match(event)

This will be called with both lines are the same
def match(event)
  @output << htmlize(event.old_element, :match_class)
end