Class: BundleParser
- Inherits:
-
Object
- Object
- BundleParser
- Defined in:
- lib/nod/bundle_parser.rb
Instance Method Summary collapse
- #gem_names ⇒ Object
-
#initialize(gemfile_path) ⇒ BundleParser
constructor
A new instance of BundleParser.
Constructor Details
#initialize(gemfile_path) ⇒ BundleParser
Returns a new instance of BundleParser.
6 7 8 |
# File 'lib/nod/bundle_parser.rb', line 6 def initialize(gemfile_path) @lockfile = Bundler::LockfileParser.new(Bundler.read_file(gemfile_path)) end |
Instance Method Details
#gem_names ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/nod/bundle_parser.rb', line 10 def gem_names names = [] @lockfile.specs.each do |s| names << s.name end names end |