From 646304a6e7c3b2c442a0a7db995629e7009c3a14 Mon Sep 17 00:00:00 2001 From: scott Chacon Date: Sun, 11 Nov 2007 17:59:18 -0800 Subject: added documentation and a license file --- doc/classes/Git/Diff.html | 419 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 419 insertions(+) create mode 100644 doc/classes/Git/Diff.html (limited to 'doc/classes/Git/Diff.html') diff --git a/doc/classes/Git/Diff.html b/doc/classes/Git/Diff.html new file mode 100644 index 0000000..a1d441e --- /dev/null +++ b/doc/classes/Git/Diff.html @@ -0,0 +1,419 @@ + + + + + + Class: Git::Diff + + + + + + + + + + +
+ + + + + + + + + + + + + + +
ClassGit::Diff
In: + + lib/git/diff.rb + +
+
Parent: + + Object + +
+
+ + +
+ + + +
+ +
+

+object that holds the last X commits on given branch +

+ +
+ + +
+ +
+

Methods

+ +
+ []   + deletions   + each   + insertions   + lines   + new   + patch   + path   + size   + stats   + to_s   +
+
+ +
+ + + +
+

Included Modules

+ +
+ Enumerable +
+
+ +
+ +
+

Classes and Modules

+ + Class Git::Diff::DiffFile
+ +
+ + + + + + + + +
+

Public Class methods

+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/diff.rb, line 16
+    def initialize(base, from = nil, to = nil)
+      @base = base
+      @from = from.to_s
+      @to = to.to_s
+    end
+
+
+
+
+ +

Public Instance methods

+ +
+ + + + +
+

+enumerable methods +

+

[Source]

+
+
+# File lib/git/diff.rb, line 61
+    def [](key)
+      process_full
+      @full_diff_files.assoc(key)[1]
+    end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/diff.rb, line 37
+    def deletions
+      cache_stats
+      @stats[:total][:deletions]
+    end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/diff.rb, line 66
+    def each
+      process_full
+      @full_diff_files.each do |file|
+        yield file[1]
+      end
+    end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/diff.rb, line 42
+    def insertions
+      cache_stats
+      @stats[:total][:insertions]
+    end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/diff.rb, line 32
+    def lines
+      cache_stats
+      @stats[:total][:lines]
+    end
+
+
+
+
+ +
+ + + + +
+

+if file is provided and is writable, it will write the patch into the file +

+

[Source]

+
+
+# File lib/git/diff.rb, line 53
+    def patch(file = nil)
+      cache_full
+      @full_diff
+    end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/diff.rb, line 22
+    def path(path)
+      @path = path
+      return self
+    end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/diff.rb, line 27
+    def size
+      cache_stats
+      @stats[:total][:files]
+    end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/diff.rb, line 47
+    def stats
+      cache_stats
+      @stats
+    end
+
+
+
+
+ +
+ + +
+ to_s(file = nil) +
+ +
+

+Alias for patch +

+
+
+ + +
+ + +
+ + +
+

[Validate]

+
+ + + \ No newline at end of file -- cgit