lib/grape/api.rb in grape-0.10.1 vs lib/grape/api.rb in grape-0.11.0
- old
+ new
@@ -51,14 +51,10 @@
end
protected
def prepare_routes
- routes = []
- endpoints.each do |endpoint|
- routes.concat(endpoint.routes)
- end
- routes
+ endpoints.map(&:routes).flatten
end
# Execute first the provided block, then each of the
# block passed in. Allows for simple 'before' setups
# of settings stack pushes.