Class: ActionDispatch::Routing::Mapper::Mapping
- Inherits:
-
Object
- Object
- ActionDispatch::Routing::Mapper::Mapping
- Defined in:
- lib/action_dispatch/routing/mapper.rb
Overview
:nodoc:
Constant Summary collapse
- IGNORE_OPTIONS =
[:to, :as, :via, :on, :constraints, :defaults, :only, :except, :anchor, :shallow, :shallow_path, :shallow_prefix]
- ANCHOR_CHARACTERS_REGEX =
%r{\A(\\A|\^)|(\\Z|\\z|\$)\Z}
- WILDCARD_PATH =
%r{\*([^/\)]+)\)?$}
Instance Method Summary collapse
-
#initialize(set, scope, path, options) ⇒ Mapping
constructor
A new instance of Mapping.
- #to_route ⇒ Object
Constructor Details
#initialize(set, scope, path, options) ⇒ Mapping
Returns a new instance of Mapping.
57 58 59 60 61 62 |
# File 'lib/action_dispatch/routing/mapper.rb', line 57 def initialize(set, scope, path, ) @set, @scope = set, scope @options = (@scope[:options] || {}).merge() @path = normalize_path(path) end |
Instance Method Details
#to_route ⇒ Object
64 65 66 |
# File 'lib/action_dispatch/routing/mapper.rb', line 64 def to_route [ app, conditions, requirements, defaults, @options[:as], @options[:anchor] ] end |