Class: ActionDispatch::Journey::Nodes::Symbol
- Defined in:
 - actionpack/lib/action_dispatch/journey/nodes/node.rb
 
Overview
:nodoc:
Constant Summary collapse
- DEFAULT_EXP =
 /[^.\/?]+/- GREEDY_EXP =
 /(.+)/
Instance Attribute Summary collapse
- 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute name.
 - 
  
    
      #regexp  ⇒ Object 
    
    
      (also: #symbol)
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute regexp.
 
Attributes inherited from Node
Instance Method Summary collapse
- 
  
    
      #initialize(left, regexp = DEFAULT_EXP)  ⇒ Symbol 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Symbol.
 - #symbol? ⇒ Boolean
 - #type ⇒ Object
 
Methods inherited from Terminal
Methods inherited from Node
#cat?, #each, #group?, #literal?, #star?, #terminal?, #to_dot, #to_s, #to_sym
Methods included from Enumerable
#as_json, #compact_blank, #exclude?, #excluding, #in_order_of, #including, #index_by, #index_with, #many?, #maximum, #minimum, #pick, #pluck, #sole
Constructor Details
#initialize(left, regexp = DEFAULT_EXP) ⇒ Symbol
Returns a new instance of Symbol.
      144 145 146 147 148  | 
    
      # File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 144 def initialize(left, regexp = DEFAULT_EXP) super(left) @regexp = regexp @name = -left.tr("*:", "") end  | 
  
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
      140 141 142  | 
    
      # File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 140 def name @name end  | 
  
#regexp ⇒ Object Also known as: symbol
Returns the value of attribute regexp.
      138 139 140  | 
    
      # File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 138 def regexp @regexp end  | 
  
Instance Method Details
#symbol? ⇒ Boolean
      151  | 
    
      # File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 151 def symbol?; true; end  | 
  
#type ⇒ Object
      150  | 
    
      # File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 150 def type; :SYMBOL; end  |