module Solargraph::Convention
Conventions provide a way to modify an ApiMap based on expectations about one of its sources.
Public Class Methods
Source
# File lib/solargraph/convention.rb, line 43 def self.for_global(doc_map) result = Environ.new @@conventions.each do |conv| result.merge conv.global(doc_map) end result end
@param doc_map [DocMap] @return [Environ]
Source
# File lib/solargraph/convention.rb, line 33 def self.for_local(source_map) result = Environ.new @@conventions.each do |conv| result.merge conv.local(source_map) end result end
@param source_map [SourceMap] @return [Environ]
Source
# File lib/solargraph/convention.rb, line 63 def self.for_object api_map, rooted_tag, scope, visibility, deep, skip, no_core result = Environ.new @@conventions.each do |conv| result.merge conv.object(api_map, rooted_tag, scope, visibility, deep, skip, no_core) end result end
Provides any additional method pins based on the described object.
@param api_map [ApiMap] @param rooted_tag [String] A fully qualified namespace, with
generic parameter values if applicable
@param scope [Symbol] :class or :instance @param visibility [Array<Symbol>] :public, :protected, and/or :private @param deep [Boolean] @param skip [Set<String>] @param no_core [Boolean] Skip core classes if true
@return [Environ]
Source
# File lib/solargraph/convention.rb, line 21 def self.register convention @@conventions.add convention.new end
@param convention [Class<Convention::Base>] @return [void]
Source
# File lib/solargraph/convention.rb, line 27 def self.unregister convention @@conventions.delete_if { |c| c.is_a?(convention) } end
@param convention [Class<Convention::Base>] @return [void]