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.
472 473 474 |
# File 'lib/rjgit_adapter/git_layer_rjgit.rb', line 472 def initialize(tree) @tree = tree end |
Instance Method Details
#/(file) ⇒ Object
480 481 482 |
# File 'lib/rjgit_adapter/git_layer_rjgit.rb', line 480 def /(file) @tree.send(:/, file) end |
#blobs ⇒ Object
484 485 486 487 |
# File 'lib/rjgit_adapter/git_layer_rjgit.rb', line 484 def blobs return Array.new if @tree == {} @tree.blobs.map{|blob| Gollum::Git::Blob.new(blob) } end |
#id ⇒ Object
476 477 478 |
# File 'lib/rjgit_adapter/git_layer_rjgit.rb', line 476 def id @tree.id end |