Module: MultiGit::TreeEntry::Base
- Extended by:
- Utils::AbstractMethods
- Includes:
- Walkable
- Included in:
- MultiGit::TreeEntry, Builder
- Defined in:
- lib/multi_git/tree_entry.rb
Instance Attribute Summary collapse
- #name ⇒ String readonly
- #parent ⇒ MultiGit::Tree::Base? readonly
Instance Method Summary collapse
-
#mode ⇒ Integer
abstract
The git-internal entry mode.
-
#path ⇒ String
Returns the full path to this entry.
- #with_parent(parent, name = self.name) ⇒ MultiGit::TreeEntry
Methods included from Utils::AbstractMethods
Methods included from Walkable
Instance Attribute Details
#name ⇒ String (readonly)
17 18 19 |
# File 'lib/multi_git/tree_entry.rb', line 17 def name @name end |
#parent ⇒ MultiGit::Tree::Base? (readonly)
19 20 21 |
# File 'lib/multi_git/tree_entry.rb', line 19 def parent @parent end |
Instance Method Details
#mode ⇒ Integer
This method is abstract.
Returns the git-internal entry mode.
26 |
# File 'lib/multi_git/tree_entry.rb', line 26 abstract :mode |
#path ⇒ String
Returns the full path to this entry.
52 53 54 55 56 57 58 59 60 |
# File 'lib/multi_git/tree_entry.rb', line 52 def path @path ||= begin if parent.respond_to? :path [parent.path,SLASH, name].join else name end end end |
#with_parent(parent, name = self.name) ⇒ MultiGit::TreeEntry
37 38 39 |
# File 'lib/multi_git/tree_entry.rb', line 37 def with_parent(parent, name = self.name) self.class.new(parent, name, @object) end |