You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: schema.rb
    path of file: ./repos/rubocop-rails/lib/rubocop/rails/schema_loader
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module RuboCop
  module Rails
    module SchemaLoader
      # Represent db/schema.rb
      class
    
        def build!(ast)
          raise "Unexpected type: #{ast.type}" unless ast.block_type?
          return unless ast.body

          each_table(ast) do |table_def|
            next unless table_def.method?(:create_table)

            @tables << Table.new(table_def)
          end

          # Compatibility for Rails 4.2.
          each_add_index(ast) do |add_index_def|
            @add_indices << AddIndex.new(add_index_def)
          end
        end