Class: ActionDispatch::Journey::Nodes::Symbol
- Defined in:
- actionpack/lib/action_dispatch/journey/nodes/node.rb
Overview
:nodoc:
Constant Summary collapse
- DEFAULT_EXP =
/[^\.\/\?]+/
Instance Attribute Summary collapse
-
#regexp ⇒ Object
(also: #symbol)
Returns the value of attribute regexp.
Attributes inherited from Node
Instance Method Summary collapse
- #default_regexp? ⇒ Boolean
-
#initialize(left) ⇒ Symbol
constructor
A new instance of Symbol.
- #symbol? ⇒ Boolean
Methods inherited from Node
#each, #literal?, #name, #to_dot, #to_s, #to_sym, #type
Methods included from Enumerable
#as_json, #exclude?, #index_by, #many?, #sum
Constructor Details
#initialize(left) ⇒ Symbol
Returns a new instance of Symbol.
74 75 76 77 |
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 74 def initialize(left) super @regexp = DEFAULT_EXP end |
Instance Attribute Details
#regexp ⇒ Object Also known as: symbol
Returns the value of attribute regexp
70 71 72 |
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 70 def regexp @regexp end |
Instance Method Details
#default_regexp? ⇒ Boolean
79 80 81 |
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 79 def default_regexp? regexp == DEFAULT_EXP end |
#symbol? ⇒ Boolean
83 |
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 83 def symbol?; true; end |