I’m making a Rack framework for Ruby that runs a App::Router module inside of the following:
module App
Router = HttpRouter.new do
get('/') { |env| erb('home') }
end
end
Notice the erb() method I wish to use in my router. The problem is getting the methods from an external source (my framework) into a module and get passed into the do block inside.
Is there there a possible way to get modules from an external source into a module in another file?
Thanks.
Is erb a method you define somewhere? Try something like this: