Module: Gemfilelint::Parser

Defined in:
lib/gemfilelint.rb

Defined Under Namespace

Classes: Invalid, Valid

Class Method Summary collapse

Class Method Details

.for(path) ⇒ Object



104
105
106
107
108
# File 'lib/gemfilelint.rb', line 104

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