Class: BundleParser

Inherits:
Object
  • Object
show all
Defined in:
lib/nod/bundle_parser.rb

Instance Method Summary collapse

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_namesObject



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