Class: GitDump::PathObject
- Inherits:
-
Object
- Object
- GitDump::PathObject
- Defined in:
- lib/git_dump/path_object.rb
Overview
Base class for Tree, Tree::Builder and Entry
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
Instance Method Summary collapse
-
#initialize(repo, dir, name) ⇒ PathObject
constructor
A new instance of PathObject.
Constructor Details
#initialize(repo, dir, name) ⇒ PathObject
5 6 7 8 9 |
# File 'lib/git_dump/path_object.rb', line 5 def initialize(repo, dir, name) @repo = repo @path = dir ? "#{dir}/#{name}" : name if name @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/git_dump/path_object.rb', line 4 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/git_dump/path_object.rb', line 4 def path @path end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
4 5 6 |
# File 'lib/git_dump/path_object.rb', line 4 def repo @repo end |