0
Regexp.new("|#{source}").match('').captures.length
0
attr_accessor :segments, :requirements, :conditions
0
+ class Segment
#:nodoc:0
attr_accessor :is_optional
0
alias_method :optional?, :is_optional
0
- class StaticSegment < Segment
0
+ class StaticSegment < Segment
#:nodoc:0
attr_accessor :value, :raw
0
alias_method :raw?, :raw
0
- class DividerSegment < StaticSegment
0
+ class DividerSegment < StaticSegment
#:nodoc:0
def initialize(value = nil)
0
- class DynamicSegment < Segment
0
+ class DynamicSegment < Segment
#:nodoc:0
attr_accessor :key, :default, :regexp
0
def initialize(key = nil, options = {})
0
- class ControllerSegment < DynamicSegment
0
+ class ControllerSegment < DynamicSegment
#:nodoc:0
possible_names = Routing.possible_controllers.collect { |name| Regexp.escape name }
0
"(?i-:(#{(regexp || Regexp.union(*possible_names)).source}))"
0
- class PathSegment < DynamicSegment
0
+ class PathSegment < DynamicSegment
#:nodoc:0
EscapedSlash = CGI.escape("/")
0
def interpolation_chunk
0
"\#{CGI.escape(#{local_name}.to_s).gsub(#{EscapedSlash.inspect}, '/')}"
0
+ class RouteBuilder
#:nodoc:0
attr_accessor :separators, :optional_separators
0
+ class RouteSet
#:nodoc:0
# Mapper instances are used to build routes. The object passed to the draw
0
# block in config/routes.rb is a Mapper instance.
0
# Mapper instances have relatively few instance methods, in order to avoid
0
# clashes with named routes.
0
# A NamedRouteCollection instance is a collection of named routes, and also
0
# maintains an anonymous module that can be used to install helpers for the
0
- class NamedRouteCollection
0
+ class NamedRouteCollection
#:nodoc:0
attr_reader :routes, :helpers
Comments
No one has commented yet.