I'm using Rack to build a REST API.
Should call be a class or an instance method?
On
In fact it does not matter.
#run from config.ru wants an object which responds to #call and that takes one argument.
A class is an object so it can be used as a Rack application.
BUT
As your application will evolve you will likely want to inject some dependencies in your application maybe a database connection :
config.ru ex :
database = Database.new
application = Application.new(database)
run application
Therfore using an instance would be a better choice, it will be easier to maintain and to test. Most of the times in OOP you should use instances.
I think it should be an instance method.
See: https://github.com/rack/rack/wiki/Rack-app-with-uri-and-HTTP-specific-responses