module Diffy::Format
def color
def color map do |line| case line when /^(---|\+\+\+|\\\\)/ "\033[90m#{line.chomp}\033[0m" when /^\+/ "\033[32m#{line.chomp}\033[0m" when /^-/ "\033[31m#{line.chomp}\033[0m" when /^@@/ "\033[36m#{line.chomp}\033[0m" else line.chomp end end.join("\n") + "\n" end
def html
def html HtmlFormatter.new(self, options.merge(:highlight_words => true)).to_s end
def html_simple
Basic html output which does not attempt to highlight the changes
def html_simple HtmlFormatter.new(self, options).to_s end
def text
def text to_a.join end