Class: GitHelpers::GitDiffDebug
- Defined in:
- lib/git_helpers/diff.rb
Constant Summary
Constants inherited from GitDiff
GitHelpers::GitDiff::NoNewLine
Instance Attribute Summary
Attributes inherited from GitDiff
Instance Method Summary collapse
- #center(msg) ⇒ Object
- #handle_line ⇒ Object
-
#initialize(*args, &b) ⇒ GitDiffDebug
constructor
A new instance of GitDiffDebug.
Methods inherited from GitDiff
#change_mode, #detect_delete, #detect_diff_header, #detect_end_diff_header, #detect_end_hunk, #detect_filename, #detect_index, #detect_new_commit, #detect_new_diff_header, #detect_new_hunk, #detect_new_submodule_header, #detect_newfile, #detect_perm, #detect_rename_copy, #each, #end_commit, #end_diff_header, #end_hunk, #end_meta, #end_submodule, #end_submodule_header, #get_file_name, #handle_commit, #handle_diff_header, #handle_hunk, #handle_meta, #handle_submodule, #handle_submodule_header, #new_commit, #new_diff_header, #new_hunk, #new_meta, #new_submodule, #new_submodule_header, #next_mode, output, #output_line, #output_lines, #parse, #parse_hunk_header, #parse_line, #prepare_new_line, #reparse, #submodule_line, #update_mode
Constructor Details
#initialize(*args, &b) ⇒ GitDiffDebug
Returns a new instance of GitDiffDebug.
393 394 395 396 |
# File 'lib/git_helpers/diff.rb', line 393 def initialize(*args,&b) super @cols=`tput cols`.to_i end |
Instance Method Details
#center(msg) ⇒ Object
398 399 400 |
# File 'lib/git_helpers/diff.rb', line 398 def center(msg) msg.center(@cols,'─') end |
#handle_line ⇒ Object
402 403 404 405 406 |
# File 'lib/git_helpers/diff.rb', line 402 def handle_line super output_line "#{@mode}: #{@orig_line}" #p @hunk if @mode==:hunk end |