\#resource_class can accept a proc.