`RouteSet` should not be listed in the public API [ci skip]

The use of `# :startdoc:` inside of the class was overriding the
outer-most `# :nodoc:`, causing it to be listed in the documented API.
This commit is contained in:
Sean Griffin 2015-02-03 11:47:39 -07:00
parent 2f904a5504
commit 4a62724c59
1 changed files with 10 additions and 10 deletions

View File

@ -12,14 +12,15 @@ require 'action_dispatch/routing/endpoint'
module ActionDispatch
module Routing
class RouteSet #:nodoc:
# :stopdoc:
class RouteSet
# Since the router holds references to many parts of the system
# like engines, controllers and the application itself, inspecting
# the route set can actually be really slow, therefore we default
# alias inspect to to_s.
alias inspect to_s
class Dispatcher < Routing::Endpoint #:nodoc:
class Dispatcher < Routing::Endpoint
def initialize(defaults)
@defaults = defaults
@controller_class_names = ThreadSafe::Cache.new
@ -84,7 +85,7 @@ module ActionDispatch
# A NamedRouteCollection instance is a collection of named routes, and also
# maintains an anonymous module that can be used to install helpers for the
# named routes.
class NamedRouteCollection #:nodoc:
class NamedRouteCollection
include Enumerable
attr_reader :routes, :url_helpers_module, :path_helpers_module
@ -161,7 +162,7 @@ module ActionDispatch
routes.length
end
class UrlHelper # :nodoc:
class UrlHelper
def self.create(route, options, route_name, url_strategy)
if optimize_helper?(route)
OptimizedUrlHelper.new(route, options, route_name, url_strategy)
@ -176,7 +177,7 @@ module ActionDispatch
attr_reader :url_strategy, :route_name
class OptimizedUrlHelper < UrlHelper # :nodoc:
class OptimizedUrlHelper < UrlHelper
attr_reader :arg_size
def initialize(route, options, route_name, url_strategy)
@ -300,11 +301,9 @@ module ActionDispatch
end
end
# :stopdoc:
# strategy for building urls to send to the client
PATH = ->(options) { ActionDispatch::Http::URL.path_for(options) }
UNKNOWN = ->(options) { ActionDispatch::Http::URL.url_for(options) }
# :startdoc:
attr_accessor :formatter, :set, :named_routes, :default_scope, :router
attr_accessor :disable_clear_and_finalize, :resources_path_names
@ -379,7 +378,7 @@ module ActionDispatch
Routing::RouteSet::Dispatcher.new(defaults)
end
module MountedHelpers #:nodoc:
module MountedHelpers
extend ActiveSupport::Concern
include UrlFor
end
@ -551,7 +550,7 @@ module ActionDispatch
end
private :build_conditions
class Generator #:nodoc:
class Generator
PARAMETERIZE = lambda do |name, value|
if name == :controller
value
@ -703,7 +702,7 @@ module ActionDispatch
options.delete(:script_name) || ''
end
def path_for(options, route_name = nil) # :nodoc:
def path_for(options, route_name = nil)
url_for(options, route_name, PATH)
end
@ -789,5 +788,6 @@ module ActionDispatch
raise ActionController::RoutingError, "No route matches #{path.inspect}"
end
end
# :startdoc:
end
end