Class: Solargraph::Convention::Base

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

Overview

The base class for Conventions.

A Convention provides Environs that customize ApiMaps with additional pins and other information. Subclasses should implement the ‘local` and `global` methods as necessary.

Direct Known Subclasses

Gemfile, Gemspec, Rakefile, Rspec

Constant Summary collapse

EMPTY_ENVIRON =
Environ.new

Instance Method Summary collapse

Instance Method Details

#global(yard_map) ⇒ Environ

The Environ for a YARD map. Subclasses can override this method.

Parameters:

Returns:



28
29
30
# File 'lib/solargraph/convention/base.rb', line 28

def global yard_map
  EMPTY_ENVIRON
end

#local(source_map) ⇒ Environ

The Environ for a source map. Subclasses can override this method.

Parameters:

Returns:



19
20
21
# File 'lib/solargraph/convention/base.rb', line 19

def local source_map
  EMPTY_ENVIRON
end