Class: Safedep::GemfileLock
- Inherits:
-
Object
- Object
- Safedep::GemfileLock
- Defined in:
- lib/safedep/gemfile_lock.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #dependencies ⇒ Object
- #find_dependency(name) ⇒ Object
-
#initialize(path) ⇒ GemfileLock
constructor
A new instance of GemfileLock.
Constructor Details
#initialize(path) ⇒ GemfileLock
Returns a new instance of GemfileLock.
8 9 10 |
# File 'lib/safedep/gemfile_lock.rb', line 8 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/safedep/gemfile_lock.rb', line 6 def path @path end |
Instance Method Details
#dependencies ⇒ Object
16 17 18 |
# File 'lib/safedep/gemfile_lock.rb', line 16 def dependencies @dependencies ||= lockfile.specs + [bundler_dependency] end |
#find_dependency(name) ⇒ Object
12 13 14 |
# File 'lib/safedep/gemfile_lock.rb', line 12 def find_dependency(name) dependencies.find { |dep| dep.name == name } end |