grape
grape copied to clipboard
Autoloading dependencies with Grape as a stand-alone API?
All my search efforts and reading of the documentation for Grape seems to indicate that autoloading is a feature provided when Grape is used in combination with another framework, such as Sinatra or Rails. I'm using Grape API as a stand alone application, and with many modules and classes I'm finding I have to explicitly define require_relatives throughout my app.
My question is, does Grape provide an autoloader similar to this out of the box?
AFAIK Grape does not, but this could be a good development opportunity, I'll label this as a feature
Grape already depends on ActiveSupport, so maybe it can be used for this.
require 'active_support/dependencies'
ActiveSupport::Dependencies.autoload_paths = [
'app'
]