Module: Solargraph::Convention
- Defined in:
- lib/solargraph/convention.rb,
lib/solargraph/convention/base.rb,
lib/solargraph/convention/rspec.rb,
lib/solargraph/convention/gemfile.rb,
lib/solargraph/convention/gemspec.rb
Overview
Conventions provide a way to modify an ApiMap based on expectations about one of its sources.
Defined Under Namespace
Classes: Base, Gemfile, Gemspec, Rspec
Constant Summary collapse
- @@conventions =
Set.new
Class Method Summary collapse
Class Method Details
.for(source) ⇒ Environ
25 26 27 28 29 30 31 32 |
# File 'lib/solargraph/convention.rb', line 25 def self.for(source) result = Environ.new return result if source.filename.nil? || source.filename.empty? @@conventions.each do |conv| result.merge conv.environ if conv.match?(source) end result end |
.register(convention) ⇒ Convention::Base
19 20 21 |
# File 'lib/solargraph/convention.rb', line 19 def self.register convention @@conventions.add convention.new end |