Module: Gemfilelint::Parser

Defined in:
lib/gemfilelint.rb

Defined Under Namespace

Classes: Invalid, Valid

Class Method Summary collapse

Class Method Details

.for(path) ⇒ Object



96
97
98
99
100
# File 'lib/gemfilelint.rb', line 96

def self.for(path)
  Valid.new(path, Bundler::Dsl.new.tap { |dsl| dsl.eval_gemfile(path) })
rescue Bundler::Dsl::DSLError
  Invalid.new(path)
end