Class: ActionDispatch::Routing::Mapper::Mapping
- Defined in:
- actionpack/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.
60 61 62 63 64 65 66 67 68 69 |
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 60 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
58 59 60 |
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 58 def conditions @conditions end |
#defaults ⇒ Object (readonly)
Returns the value of attribute defaults
58 59 60 |
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 58 def defaults @defaults end |
#options ⇒ Object (readonly)
Returns the value of attribute options
58 59 60 |
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 58 def @options end |
#path ⇒ Object (readonly)
Returns the value of attribute path
58 59 60 |
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 58 def path @path end |
#requirements ⇒ Object (readonly)
Returns the value of attribute requirements
58 59 60 |
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 58 def requirements @requirements end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope
58 59 60 |
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 58 def scope @scope end |
Instance Method Details
#to_route ⇒ Object
71 72 73 |
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 71 def to_route [ app, conditions, requirements, defaults, [:as], [:anchor] ] end |