Class: ActionDispatch::Journey::Nodes::Symbol

Inherits:
Terminal
  • Object
show all
Defined in:
lib/action_dispatch/journey/nodes/node.rb

Overview

:nodoc:

Constant Summary collapse

DEFAULT_EXP =
/[^\.\/\?]+/

Instance Attribute Summary collapse

Attributes inherited from Node

#left, #memo

Instance Method Summary collapse

Methods inherited from Node

#each, #literal?, #name, #to_dot, #to_s, #to_sym, #type

Constructor Details

#initialize(left) ⇒ Symbol

Returns a new instance of Symbol.



74
75
76
77
# File 'lib/action_dispatch/journey/nodes/node.rb', line 74

def initialize(left)
  super
  @regexp = DEFAULT_EXP
end

Instance Attribute Details

#regexpObject Also known as: symbol

Returns the value of attribute regexp.



70
71
72
# File 'lib/action_dispatch/journey/nodes/node.rb', line 70

def regexp
  @regexp
end

Instance Method Details

#default_regexp?Boolean

Returns:

  • (Boolean)


79
80
81
# File 'lib/action_dispatch/journey/nodes/node.rb', line 79

def default_regexp?
  regexp == DEFAULT_EXP
end

#symbol?Boolean

Returns:

  • (Boolean)


83
# File 'lib/action_dispatch/journey/nodes/node.rb', line 83

def symbol?; true; end