From bc60052b519b8b991e50b8ccb30f2b76ad125996 Mon Sep 17 00:00:00 2001 From: scott Chacon Date: Fri, 16 Nov 2007 13:24:30 -0800 Subject: updated the docs --- doc/classes/Git/Object/AbstractObject.html | 305 ++++++++++++++++++++++------- 1 file changed, 239 insertions(+), 66 deletions(-) (limited to 'doc/classes/Git/Object/AbstractObject.html') diff --git a/doc/classes/Git/Object/AbstractObject.html b/doc/classes/Git/Object/AbstractObject.html index 222bc67..86529df 100644 --- a/doc/classes/Git/Object/AbstractObject.html +++ b/doc/classes/Git/Object/AbstractObject.html @@ -86,14 +86,21 @@

Methods

- contents   - contents_array   - diff   - grep   - log   - new   - setup   - to_s   + archive   + blob?   + commit?   + contents   + contents_array   + diff   + grep   + log   + new   + setup   + sha   + size   + tag?   + to_s   + tree?  
@@ -119,7 +126,7 @@ - sha + objectish  [RW]  @@ -143,25 +150,24 @@

Public Class methods

-
- +
+

[Source]

-
+ onclick="toggleCode('M000161-source');return false;">[Source]

+
-# File lib/git/object.rb, line 14
-      def initialize(base, sha)
+# File lib/git/object.rb, line 17
+      def initialize(base, objectish)
         @base = base
-        @sha = sha.to_s
-        @size = @base.lib.object_size(@sha)
+        @objectish = objectish.to_s
         setup
       end
 
@@ -171,44 +177,119 @@

Public Instance methods

-
- +
+ + +
+

+creates an archive of this object (tree) +

+

[Source]

+
+
+# File lib/git/object.rb, line 63
+      def archive(file = nil, opts = {})
+        @base.lib.archive(@objectish, file, opts)
+      end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/object.rb, line 71
+      def blob?
+        @type == 'blob'
+      end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/object.rb, line 75
+      def commit?
+        @type == 'commit'
+      end
+
+
+
+
+ +
+ + +
+

+caches the contents of this call in memory +

[Source]

-
+ onclick="toggleCode('M000164-source');return false;">[Source]

+
-# File lib/git/object.rb, line 21
+# File lib/git/object.rb, line 32
       def contents
-        @base.lib.object_contents(@sha)
+        @contents || @contents = @base.lib.object_contents(@objectish)
       end
 
-
- +
+

[Source]

-
+ onclick="toggleCode('M000165-source');return false;">[Source]

+
-# File lib/git/object.rb, line 25
+# File lib/git/object.rb, line 36
       def contents_array
         self.contents.split("\n")
       end
@@ -217,46 +298,46 @@
         
-
- +
+

[Source]

-
+ onclick="toggleCode('M000169-source');return false;">[Source]

+
-# File lib/git/object.rb, line 43
+# File lib/git/object.rb, line 54
       def diff(objectish)
-        Git::Diff.new(@base, @sha, objectish)
+        Git::Diff.new(@base, @objectish, objectish)
       end
 
-
- +
+

[Source]

-
+ onclick="toggleCode('M000168-source');return false;">[Source]

+
-# File lib/git/object.rb, line 37
+# File lib/git/object.rb, line 48
       def grep(string, path_limiter = nil, opts = {})
-        default = {:object => @sha, :path_limiter => path_limiter}
+        default = {:object => sha, :path_limiter => path_limiter}
         grep_options = default.merge(opts)
         @base.lib.grep(string, grep_options)
       end
@@ -265,44 +346,44 @@
         
-
- +
+

[Source]

-
+ onclick="toggleCode('M000170-source');return false;">[Source]

+
-# File lib/git/object.rb, line 47
+# File lib/git/object.rb, line 58
       def log(count = 30)
-        Git::Log.new(@base, count).object(@sha)
+        Git::Log.new(@base, count).object(@objectish)
       end
 
-
- +
+

[Source]

-
+ onclick="toggleCode('M000166-source');return false;">[Source]

+
-# File lib/git/object.rb, line 29
+# File lib/git/object.rb, line 40
       def setup
         raise NotImplementedError
       end
@@ -311,23 +392,115 @@
         
-
- +
+ + +
+

[Source]

+
+
+# File lib/git/object.rb, line 23
+      def sha
+        @sha || @sha = @base.lib.revparse(@objectish)
+      end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/object.rb, line 27
+      def size
+        @size || @size = @base.lib.object_size(@objectish)
+      end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/object.rb, line 79
+     def tag?
+       @type == 'tag'
+     end
+
+
+
+
+ +
+ + +

[Source]

-
+ onclick="toggleCode('M000167-source');return false;">[Source]

+
-# File lib/git/object.rb, line 33
+# File lib/git/object.rb, line 44
       def to_s
-        @sha
+        sha
+      end
+
+
+
+
+ +
+ + + + +
+

[Source]

+
+
+# File lib/git/object.rb, line 67
+      def tree?
+        @type == 'tree'
       end
 
-- cgit