Class: Grit::Diff

Inherits:
Object
  • Object
show all
Defined in:
lib/grit_ext/diff.rb

Instance Method Summary collapse

Instance Method Details

#diffObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/grit_ext/diff.rb', line 12

def diff
  if @diff.nil?
    @diff = ""
  else
    lines = @diff.lines.to_a
    path = GritExt.encode! lines.shift(2).join
    body = GritExt.encode! lines.join
    @diff = path + body
  end
end

#new_pathObject



8
9
10
# File 'lib/grit_ext/diff.rb', line 8

def new_path
  GritExt.encode! @b_path
end

#old_pathObject



4
5
6
# File 'lib/grit_ext/diff.rb', line 4

def old_path
  GritExt.encode! @a_path
end