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
permalink
#initialize(base, sha, mode = nil) ⇒ Tree
Returns a new instance of Tree.
[View source]
101
102
103
104
105
106
|
# File 'lib/git/object.rb', line 101
def initialize(base, sha, mode = nil)
super(base, sha)
@mode = mode
@trees = nil
@blobs = nil
end
|
Instance Method Details
permalink
#blobs
Also known as:
files
[View source]
112
113
114
|
# File 'lib/git/object.rb', line 112
def blobs
@blobs ||= check_tree[:blobs]
end
|
[View source]
108
109
110
|
# File 'lib/git/object.rb', line 108
def children
blobs.merge(subtrees)
end
|
[View source]
127
128
129
|
# File 'lib/git/object.rb', line 127
def depth
@base.lib.tree_depth(@objectish)
end
|
[View source]
123
124
125
|
# File 'lib/git/object.rb', line 123
def full_tree
@base.lib.full_tree(@objectish)
end
|
[View source]
131
132
133
|
# File 'lib/git/object.rb', line 131
def tree?
true
end
|
permalink
#trees
Also known as:
subtrees, subdirectories
[View source]
117
118
119
|
# File 'lib/git/object.rb', line 117
def trees
@trees ||= check_tree[:trees]
end
|