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
7 8 9 10 11 12 13 |
# File 'lib/git_dump/path_object.rb', line 7 def initialize(repo, dir, name) fail ArgumentError, 'Expected Repo' unless repo.is_a?(Repo) @repo = repo @path = dir ? "#{dir}/#{name}" : name if name @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/git_dump/path_object.rb', line 6 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/git_dump/path_object.rb', line 6 def path @path end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
6 7 8 |
# File 'lib/git_dump/path_object.rb', line 6 def repo @repo end |