Class: Git::Object::Tree
Instance Attribute Summary
#mode, #objectish, #size, #type
Instance Method Summary
collapse
#archive, #blob?, #commit?, #contents, #contents_array, #diff, #grep, #log, #sha, #tag?, #to_s
Constructor Details
#initialize(base, sha, mode = nil) ⇒ Tree
Returns a new instance of Tree.
98
99
100
101
|
# File 'lib/git/object.rb', line 98
def initialize(base, sha, mode = nil)
super(base, sha)
@mode = mode
end
|
Instance Method Details
#blobs ⇒ Object
Also known as:
files
107
108
109
110
|
# File 'lib/git/object.rb', line 107
def blobs
check_tree
@blobs
end
|
103
104
105
|
# File 'lib/git/object.rb', line 103
def children
blobs.merge(subtrees)
end
|
124
125
126
|
# File 'lib/git/object.rb', line 124
def depth
@base.lib.tree_depth(@objectish)
end
|
#full_tree ⇒ Object
120
121
122
|
# File 'lib/git/object.rb', line 120
def full_tree
@base.lib.full_tree(@objectish)
end
|
#tree? ⇒ Boolean
128
129
130
|
# File 'lib/git/object.rb', line 128
def tree?
true
end
|
#trees ⇒ Object
Also known as:
subtrees, subdirectories
113
114
115
116
|
# File 'lib/git/object.rb', line 113
def trees
check_tree
@trees
end
|