return 'top' unless pk if pk.instance_of?(::CompositePrimaryKeys::CompositeKeys) sql_types = [] pk.each do |x| col = klass.columns.find { |column| column.name == x } sql_types << sql_type_to_class(col.type) end return sql_types.join(' | ') end col = klass.columns.find { |column| column.name == pk } sql_type_to_class(col.type) end end
(untyped attr_name) -> untyped | ... end end module Scoping module Named extend ActiveSupport::Concern module ClassMethods def scope: (untyped name, untyped body) -> untyped | ... end end end end