module SyntaxTree::Index

def self.index(source, backend: INDEX_BACKEND.new)

This method accepts source code and then indexes it.
def self.index(source, backend: INDEX_BACKEND.new)
  backend.index(source)
end

def self.index_file(filepath, backend: INDEX_BACKEND.new)

This method accepts a filepath and then indexes it.
def self.index_file(filepath, backend: INDEX_BACKEND.new)
  backend.index_file(filepath)
end