Class: Hellgrid::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/hellgrid/project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root, path) ⇒ Project

Returns a new instance of Project.



7
8
9
10
# File 'lib/hellgrid/project.rb', line 7

def initialize(root, path)
  @root = root
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/hellgrid/project.rb', line 5

def path
  @path
end

Instance Method Details

#dependency_matrixObject



16
17
18
# File 'lib/hellgrid/project.rb', line 16

def dependency_matrix
  @dependency_matrix ||= specs.inject({}) { |h, spec| h.merge!(spec.name.to_s => spec.version.version) }
end

#nameObject



12
13
14
# File 'lib/hellgrid/project.rb', line 12

def name
  File.expand_path(path).gsub("#{File.expand_path(root)}/", '')
end