Class: Solargraph::Convention::Gemfile

Inherits:
Base
  • Object
show all
Defined in:
lib/solargraph/convention/gemfile.rb

Constant Summary

Constants inherited from Base

Base::EMPTY_ENVIRON

Instance Method Summary collapse

Methods inherited from Base

#global

Instance Method Details

#local(source_map) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/solargraph/convention/gemfile.rb', line 6

def local source_map
  return EMPTY_ENVIRON unless File.basename(source_map.filename) == 'Gemfile'
  @environ ||= Environ.new(
    requires: ['bundler'],
    domains: ['Bundler::Dsl']
  )
end