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: models.rb
    path of file: ./repos/zammad/lib
    
    the code of the file until where you have to start completion: # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/

class Models
  include ApplicationLib

=begin

get list of models

  result = Models.all

returns

  {
    Some::Classname1 => {
      attributes: ['id', 'name', '...'],
    
    
  def self.all
    @all ||= begin
      all    = {}
      dir    = Rails.root.join('app/models').to_s
      tables = ActiveRecord::Base.connection.tables
      Dir.glob("#{dir}/**/*.rb") do |entry|
        next if entry.match?(%r{application_model}i)
        next if entry.match?(%r{channel/}i)
        next if entry.match?(%r{observer/}i)
        next if entry.match?(%r{store/provider/}i)
        next if entry.match?(%r{models/concerns/}i)
        next if entry.match?(%r{models/object_manager/attribute/validation/}i)

        entry.gsub!(dir, '')
        entry = entry.to_classname
        model_class = entry.constantize
        next if !model_class.respond_to? :new
        next if !model_class.respond_to? :table_name

        table_name = model_class.table_name # handle models where not table exists, pending migrations
        next if tables.exclude?(table_name)

        model_object = model_class.new
        next if !model_object.respond_to? :attributes

        all[model_class] = {}
        all[model_class][:attributes] = model_class.attribute_names
        all[model_class][:reflections] = model_class.reflections
        all[model_class][:table] = model_class.table_name
        # puts model_class
        # puts "rrrr #{all[model_class][:attributes]}"
        # puts " #{model_class.attribute_names.inspect}"
      end
      all
    end