Class: DiffToHtml::GitConverter

Inherits:
Converter show all
Defined in:
lib/diff_to_html/git_converter.rb

Instance Attribute Summary

Attributes inherited from Converter

#file_prefix

Instance Method Summary collapse

Methods inherited from Converter

#composite_to_html, #diffs_to_html, #get_single_file_diff, #get_single_file_diff_body

Instance Method Details

#file_header_patternObject



4
5
6
# File 'lib/diff_to_html/git_converter.rb', line 4

def file_header_pattern
  /^diff --git.+/
end

#get_filename(file_diff) ⇒ Object



8
9
10
11
12
# File 'lib/diff_to_html/git_converter.rb', line 8

def get_filename(file_diff)
  match = (file_diff =~ / b\/(.+)/)
  raise "not matched!" if !match
  $1
end