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, :format]
- ANCHOR_CHARACTERS_REGEX =
%r{\A(\\A|\^)|(\\Z|\\z|\$)\Z}
- WILDCARD_PATH =
%r{\*([^/\)]+)\)?$}
Instance Attribute Summary collapse
-
#conditions ⇒ Object
readonly
Returns the value of attribute conditions.
-
#defaults ⇒ Object
readonly
Returns the value of attribute defaults.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#requirements ⇒ Object
readonly
Returns the value of attribute requirements.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
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.
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/action_dispatch/routing/mapper.rb', line 61 def initialize(set, scope, path, ) @set, @scope, @path, @options = set, scope, path, @requirements, @conditions, @defaults = {}, {}, {} normalize_path! normalize_requirements! normalize_conditions! normalize_defaults! end |
Instance Attribute Details
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
59 60 61 |
# File 'lib/action_dispatch/routing/mapper.rb', line 59 def conditions @conditions end |
#defaults ⇒ Object (readonly)
Returns the value of attribute defaults.
59 60 61 |
# File 'lib/action_dispatch/routing/mapper.rb', line 59 def defaults @defaults end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
59 60 61 |
# File 'lib/action_dispatch/routing/mapper.rb', line 59 def @options end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
59 60 61 |
# File 'lib/action_dispatch/routing/mapper.rb', line 59 def path @path end |
#requirements ⇒ Object (readonly)
Returns the value of attribute requirements.
59 60 61 |
# File 'lib/action_dispatch/routing/mapper.rb', line 59 def requirements @requirements end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
59 60 61 |
# File 'lib/action_dispatch/routing/mapper.rb', line 59 def scope @scope end |
Instance Method Details
#to_route ⇒ Object
72 73 74 |
# File 'lib/action_dispatch/routing/mapper.rb', line 72 def to_route [ app, conditions, requirements, defaults, [:as], [:anchor] ] end |