Class: BundlerDependencyMatrix::Project
- Inherits:
-
Object
- Object
- BundlerDependencyMatrix::Project
- Defined in:
- lib/bundler_dependency_matrix/project.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #dependency_matrix ⇒ Object
-
#initialize(path) ⇒ Project
constructor
A new instance of Project.
- #name ⇒ Object
Constructor Details
#initialize(path) ⇒ Project
Returns a new instance of Project.
5 6 7 |
# File 'lib/bundler_dependency_matrix/project.rb', line 5 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/bundler_dependency_matrix/project.rb', line 3 def path @path end |
Instance Method Details
#dependency_matrix ⇒ Object
13 14 15 |
# File 'lib/bundler_dependency_matrix/project.rb', line 13 def dependency_matrix @dependency_matrix ||= specs.inject(Hash.new) { |h,spec| h.merge!(spec.name.to_s => spec.version.version) } end |
#name ⇒ Object
9 10 11 |
# File 'lib/bundler_dependency_matrix/project.rb', line 9 def name File.basename(File.(path)) end |