Class: Dotpack::Package
- Inherits:
-
Object
- Object
- Dotpack::Package
- Defined in:
- lib/dotpack/package.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/dotpack/package.rb', line 5 def path @path end |
Class Method Details
.all ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/dotpack/package.rb', line 9 def self.all return @packages unless @packages.nil? repos = Repo.all packages = repos.map{|x| Dir[x.path + "/*"]}.flatten packages.select!{|x| File.exist? x + "/Dotpackfile"} @packages = packages.map{|x| Package.new(x)} @packages end |