Class: ActionDispatch::Journey::Nodes::Node
- Inherits:
-
Object
- Object
- ActionDispatch::Journey::Nodes::Node
show all
- Includes:
- Enumerable
- Defined in:
- lib/action_dispatch/journey/nodes/node.rb
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(left) ⇒ Node
Returns a new instance of Node.
[View source]
74
75
76
77
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 74
def initialize(left)
@left = left
@memo = nil
end
|
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left.
72
73
74
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 72
def left
@left
end
|
#memo ⇒ Object
Returns the value of attribute memo.
72
73
74
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 72
def memo
@memo
end
|
Instance Method Details
#cat? ⇒ Boolean
[View source]
107
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 107
def cat?; false; end
|
#group? ⇒ Boolean
[View source]
108
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 108
def group?; false; end
|
#literal? ⇒ Boolean
[View source]
104
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 104
def literal?; false; end
|
#name ⇒ Object
[View source]
95
96
97
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 95
def name
-left.tr("*:", "")
end
|
#star? ⇒ Boolean
[View source]
106
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 106
def star?; false; end
|
#symbol? ⇒ Boolean
[View source]
103
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 103
def symbol?; false; end
|
#terminal? ⇒ Boolean
[View source]
105
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 105
def terminal?; false; end
|
#to_dot ⇒ Object
[View source]
87
88
89
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 87
def to_dot
Visitors::Dot::INSTANCE.accept(self)
end
|
#to_sym ⇒ Object
[View source]
91
92
93
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 91
def to_sym
name.to_sym
end
|
#type ⇒ Object
[View source]
99
100
101
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 99
def type
raise NotImplementedError
end
|