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

ActiveSupportConcern, Gemfile, Gemspec, Rakefile

Constant Summary collapse

EMPTY_ENVIRON =
Environ.new

Instance Method Summary collapse

Instance Method Details

#global(doc_map) ⇒ Environ

The Environ for a DocMap. Subclasses can override this method.

Parameters:

Returns:



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

def global doc_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

#object(api_map, rooted_tag, scope, visibility, deep, skip, no_core) ⇒ Environ

Provides any additional method pins based on e the described object.

Parameters:

  • A fully qualified namespace, with generic parameter values if applicable

  • :class or :instance

  • :public, :protected, and/or :private

  • Skip core classes if true

Returns:



44
45
46
47
# File 'lib/solargraph/convention/base.rb', line 44

def object api_map, rooted_tag, scope, visibility,
           deep, skip, no_core
  EMPTY_ENVIRON
end