Method: Grit::Tree#construct_initialize

Defined in:
lib/grit/tree.rb

#construct_initialize(repo, id, text) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/grit/tree.rb', line 22

def construct_initialize(repo, id, text)
  @repo = repo
  @id = id
  @contents = []

  text.split("\n").each do |line|
    @contents << content_from_string(repo, line)
  end
  @contents.compact!

  self
end