Class: Gollum::Git::Tree
- Inherits:
-
Object
- Object
- Gollum::Git::Tree
- Defined in:
- lib/rjgit_adapter/git_layer_rjgit.rb
Instance Method Summary collapse
- #/(file) ⇒ Object
- #blobs ⇒ Object
- #id ⇒ Object
-
#initialize(tree) ⇒ Tree
constructor
A new instance of Tree.
Constructor Details
#initialize(tree) ⇒ Tree
Returns a new instance of Tree.
433 434 435 |
# File 'lib/rjgit_adapter/git_layer_rjgit.rb', line 433 def initialize(tree) @tree = tree end |
Instance Method Details
#/(file) ⇒ Object
441 442 443 |
# File 'lib/rjgit_adapter/git_layer_rjgit.rb', line 441 def /(file) @tree.send(:/, file) end |
#blobs ⇒ Object
445 446 447 448 |
# File 'lib/rjgit_adapter/git_layer_rjgit.rb', line 445 def blobs return Array.new if @tree == {} @tree.blobs.map{|blob| Gollum::Git::Blob.new(blob) } end |
#id ⇒ Object
437 438 439 |
# File 'lib/rjgit_adapter/git_layer_rjgit.rb', line 437 def id @tree.id end |