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.
13
14
15
16
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 13
def initialize(left)
@left = left
@memo = nil
end
|
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left.
11
12
13
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 11
def left
@left
end
|
#memo ⇒ Object
Returns the value of attribute memo.
11
12
13
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 11
def memo
@memo
end
|
Instance Method Details
#cat? ⇒ Boolean
46
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 46
def cat?; false; end
|
#each(&block) ⇒ Object
18
19
20
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 18
def each(&block)
Visitors::Each::INSTANCE.accept(self, block)
end
|
#group? ⇒ Boolean
47
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 47
def group?; false; end
|
#literal? ⇒ Boolean
43
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 43
def literal?; false; end
|
#name ⇒ Object
34
35
36
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 34
def name
-left.tr("*:", "")
end
|
#star? ⇒ Boolean
45
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 45
def star?; false; end
|
#symbol? ⇒ Boolean
42
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 42
def symbol?; false; end
|
#terminal? ⇒ Boolean
44
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 44
def terminal?; false; end
|
#to_dot ⇒ Object
26
27
28
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 26
def to_dot
Visitors::Dot::INSTANCE.accept(self)
end
|
#to_s ⇒ Object
22
23
24
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 22
def to_s
Visitors::String::INSTANCE.accept(self, "")
end
|
#to_sym ⇒ Object
30
31
32
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 30
def to_sym
name.to_sym
end
|
#type ⇒ Object
38
39
40
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 38
def type
raise NotImplementedError
end
|