Class: Gemologist::GemfileLock

Inherits:
Object
  • Object
show all
Defined in:
lib/gemologist/gemfile_lock.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ GemfileLock

Returns a new instance of GemfileLock.



7
8
9
# File 'lib/gemologist/gemfile_lock.rb', line 7

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/gemologist/gemfile_lock.rb', line 5

def path
  @path
end

Instance Method Details

#dependenciesObject



15
16
17
# File 'lib/gemologist/gemfile_lock.rb', line 15

def dependencies
  lockfile.specs
end

#find_dependency(name) ⇒ Object



11
12
13
# File 'lib/gemologist/gemfile_lock.rb', line 11

def find_dependency(name)
  dependencies.find { |dep| dep.name == name }
end