Hey. I am developing a simple api in ruby using intridea grape. Say we have this:
class API_v1 < Grape::API resource :foo do end resource :bar do end end
How can I make it so that the declaration for :foo and :bar in separate files? Basically, I wanted to know if it is possible to have something similar to rails controllers, where there are several files for organizing the code.
I hope someone can give me an idea of how to achieve this.
source share