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.
Methods inherited from Node
#each, #name, #to_dot, #to_s, #to_sym, #type
Constructor Details
#initialize(left) ⇒ Symbol
Returns a new instance of Symbol.
57 58 59 60 |
# File 'lib/journey/nodes/node.rb', line 57 def initialize left super @regexp = DEFAULT_EXP end |
Instance Attribute Details
#regexp ⇒ Object Also known as: symbol
Returns the value of attribute regexp.
53 54 55 |
# File 'lib/journey/nodes/node.rb', line 53 def regexp @regexp end |
Instance Method Details
#default_regexp? ⇒ Boolean
62 63 64 |
# File 'lib/journey/nodes/node.rb', line 62 def default_regexp? regexp == DEFAULT_EXP end |