class Solargraph::Workspace

def merge source

Returns:
  • (Boolean) - True if the source was added to the workspace

Parameters:
  • source (Solargraph::Source) --
def merge source
  unless directory == '*' || source_hash.key?(source.filename)
    # Reload the config to determine if a new source should be included

    @config = Solargraph::Workspace::Config.new(directory)
    return false unless config.calculated.include?(source.filename)
  end
  source_hash[source.filename] = source
  true
end