Class: Solargraph::Convention::Gemspec

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

Constant Summary

Constants inherited from Base

Base::EMPTY_ENVIRON

Instance Method Summary collapse

Instance Method Details

#environObject



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/solargraph/convention/gemspec.rb', line 10

def environ
  @environ ||= Environ.new(
    requires: ['rubygems'],
    overrides: [
      Solargraph::Pin::Reference::Override.from_comment(
        'Gem::Specification.new',
        %(
@yieldparam [self]
        )
      )
    ]
  )
end

#match?(source) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/solargraph/convention/gemspec.rb', line 6

def match? source
  File.basename(source.filename).end_with?('.gemspec')
end