Object
# File lib/grape-swagger.rb, line 8 def add_swagger_documentation(options={}) documentation_class = create_documentation_class documentation_class.setup({:target_class => self}.merge(options)) mount(documentation_class) @combined_routes = {} routes.each do |route| route_match = route.route_path.split(route.route_prefix).last.match('\/([\w|-]*?)[\.\/\(]') next if route_match.nil? resource = route_match.captures.first next if resource.empty? resource.downcase! @combined_routes[resource] ||= [] unless @@hide_documentation_path and route.route_path.include?(@@mount_path) @combined_routes[resource] << route end end end
Generated with the Darkfish Rdoc Generator 2.