Class: ActionDispatch::Journey::Nodes::Symbol
- Defined in:
 - lib/action_dispatch/journey/nodes/node.rb
 
Overview
:nodoc:
Constant Summary collapse
- DEFAULT_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
- #default_regexp? ⇒ Boolean
 - 
  
    
      #initialize(left)  ⇒ Symbol 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Symbol.
 - #symbol? ⇒ Boolean
 
Methods inherited from Terminal
Methods inherited from Node
#cat?, #each, #group?, #literal?, #star?, #terminal?, #to_dot, #to_s, #to_sym, #type
Constructor Details
#initialize(left) ⇒ Symbol
Returns a new instance of Symbol.
      82 83 84 85 86  | 
    
      # File 'lib/action_dispatch/journey/nodes/node.rb', line 82 def initialize(left) super @regexp = DEFAULT_EXP @name = left.tr "*:".freeze, "".freeze end  | 
  
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
      79 80 81  | 
    
      # File 'lib/action_dispatch/journey/nodes/node.rb', line 79 def name @name end  | 
  
#regexp ⇒ Object Also known as: symbol
Returns the value of attribute regexp.
      77 78 79  | 
    
      # File 'lib/action_dispatch/journey/nodes/node.rb', line 77 def regexp @regexp end  | 
  
Instance Method Details
#default_regexp? ⇒ Boolean
      88 89 90  | 
    
      # File 'lib/action_dispatch/journey/nodes/node.rb', line 88 def default_regexp? regexp == DEFAULT_EXP end  | 
  
#symbol? ⇒ Boolean
      92  | 
    
      # File 'lib/action_dispatch/journey/nodes/node.rb', line 92 def symbol?; true; end  |