Class: Journey::Nodes::Symbol
- Defined in:
- lib/journey/nodes/node.rb
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
Constructor Details
#initialize(left) ⇒ Symbol
Returns a new instance of Symbol.
73 74 75 76 |
# File 'lib/journey/nodes/node.rb', line 73 def initialize left super @regexp = DEFAULT_EXP end |
Instance Attribute Details
#regexp ⇒ Object Also known as: symbol
Returns the value of attribute regexp.
69 70 71 |
# File 'lib/journey/nodes/node.rb', line 69 def regexp @regexp end |
Instance Method Details
#default_regexp? ⇒ Boolean
78 79 80 |
# File 'lib/journey/nodes/node.rb', line 78 def default_regexp? regexp == DEFAULT_EXP end |
#symbol? ⇒ Boolean
82 |
# File 'lib/journey/nodes/node.rb', line 82 def symbol?; true; end |