提交 4a62724c 编写于 作者: S Sean Griffin

`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.
上级 2f904a55
......@@ -12,14 +12,15 @@
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 @@ def merge_default_action!(params)
# 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 @@ def length
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 @@ def self.optimize_helper?(route)
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 @@ def define_url_helper(mod, route, name, opts, route_key, url_strategy)
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 @@ def dispatcher(defaults)
Routing::RouteSet::Dispatcher.new(defaults)
end
module MountedHelpers #:nodoc:
module MountedHelpers
extend ActiveSupport::Concern
include UrlFor
end
......@@ -551,7 +550,7 @@ def build_conditions(current_conditions, path_values)
end
private :build_conditions
class Generator #:nodoc:
class Generator
PARAMETERIZE = lambda do |name, value|
if name == :controller
value
......@@ -703,7 +702,7 @@ def find_script_name(options)
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 @@ def recognize_path(path, environment = {})
raise ActionController::RoutingError, "No route matches #{path.inspect}"
end
end
# :startdoc:
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册