Class: Space::Model::Repo
- Inherits:
-
Object
- Object
- Space::Model::Repo
- Defined in:
- lib/space/model/repo.rb,
lib/space/model/repo/git.rb,
lib/space/model/repo/bundle.rb,
lib/space/model/repo/dependency.rb
Defined Under Namespace
Classes: Bundle, Dependency, Git
Instance Attribute Summary collapse
-
#bundle ⇒ Object
readonly
Returns the value of attribute bundle.
-
#git ⇒ Object
readonly
Returns the value of attribute git.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #deps ⇒ Object
-
#initialize(project, path) ⇒ Repo
constructor
A new instance of Repo.
- #name ⇒ Object
- #number ⇒ Object
- #ref ⇒ Object
- #refresh ⇒ Object
Constructor Details
Instance Attribute Details
#bundle ⇒ Object (readonly)
Returns the value of attribute bundle.
8 9 10 |
# File 'lib/space/model/repo.rb', line 8 def bundle @bundle end |
#git ⇒ Object (readonly)
Returns the value of attribute git.
8 9 10 |
# File 'lib/space/model/repo.rb', line 8 def git @git end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/space/model/repo.rb', line 8 def path @path end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
8 9 10 |
# File 'lib/space/model/repo.rb', line 8 def project @project end |
Instance Method Details
#deps ⇒ Object
29 30 31 |
# File 'lib/space/model/repo.rb', line 29 def deps bundle.deps end |
#name ⇒ Object
17 18 19 |
# File 'lib/space/model/repo.rb', line 17 def name @name ||= File.basename(path) end |
#number ⇒ Object
21 22 23 |
# File 'lib/space/model/repo.rb', line 21 def number @number ||= project.number(name) end |
#ref ⇒ Object
25 26 27 |
# File 'lib/space/model/repo.rb', line 25 def ref git.commit end |
#refresh ⇒ Object
33 34 35 |
# File 'lib/space/model/repo.rb', line 33 def refresh [git, bundle].each(&:refresh) end |