Method: Command::Diff#display_diff_on_oneself

Defined in:
lib/command/diff.rb

#display_diff_on_oneself(id) ⇒ Object

diff-lcs を使って自力で差分表示



305
306
307
308
309
310
311
312
# File 'lib/command/diff.rb', line 305

def display_diff_on_oneself(id)
  require_relative "../diffviewer"
  temp_paths = create_temp_files(id) or return
  puts "#{@novel_data["title"]} の差分を表示します"
  DiffViewer.new(*temp_paths).view
ensure
  temp_paths.map(&:delete) if temp_paths
end