def awesome_mongo_mapper_class(object)
      return object.inspect if !defined?(::ActiveSupport::OrderedHash) || !object.respond_to?(:keys)

      data = object.keys.sort.inject(::ActiveSupport::OrderedHash.new) do |hash, c|
        hash[c.first] = (c.last.type || 'undefined').to_s.underscore.intern
        hash
      end

      # Add in associations
      if @options[:mongo_mapper][:show_associations]
        object.associations.each do |name, assoc|
          data[name.to_s] = assoc
        end
      end

      name = "class #{awesome_simple(object.to_s, :class)}"
      base = "< #{awesome_simple(object.superclass.to_s, :class)}"

      [name, base, awesome_hash(data)].join(' ')
    end
def awesome_mongo_mapper_class(object)
      return object.inspect if !defined?(::ActiveSupport::OrderedHash) || !object.respond_to?(:keys)

      data = object.keys.sort.inject(::ActiveSupport::OrderedHash.new) do |hash, c|
        hash[c.first] = (c.last.type || 'undefined').to_s.underscore.intern
        hash
      end

      # Add in associations
      if @options[:mongo_mapper][:show_associations]
        object.associations.each do |name, assoc|
          data[name.to_s] = assoc
        end
      end

      name = "class #{awesome_simple(object.to_s, :class)}"
      base = "< #{awesome_simple(object.superclass.to_s, :class)}"

      [name, base, awesome_hash(data)].join(' ')
    end
Format MongoMapper class object.
------------------------------------------------------------------------------