tree.rb 377 字节
Newer Older
D
Dmitriy Zaporozhets 已提交
1
class Tree
D
Dmitriy Zaporozhets 已提交
2
  attr_accessor :path, :tree, :ref
D
Dmitriy Zaporozhets 已提交
3

4 5
  def initialize(repository, sha, ref = nil, path = nil)
    @raw = Gitlab::Git::Tree.new(repository, sha, ref, path)
D
Dmitriy Zaporozhets 已提交
6
  end
G
gitlabhq 已提交
7

R
Robert Speicher 已提交
8
  def invalid?
9
    @raw.nil?
R
Robert Speicher 已提交
10 11
  end

12 13
  def method_missing(m, *args, &block)
    @raw.send(m, *args, &block)
G
gitlabhq 已提交
14
  end
15

16 17
  def respond_to?(method)
    return true if @raw.respond_to?(method)
18

19
    super
20
  end
D
Dmitriy Zaporozhets 已提交
21
end