Class: ActionDispatch::Journey::Nodes::Node
- Inherits:
-
Object
- Object
- ActionDispatch::Journey::Nodes::Node
show all
- Includes:
- Enumerable
- Defined in:
- actionpack/lib/action_dispatch/journey/nodes/node.rb
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Enumerable
#as_json, #compact_blank, #exclude?, #excluding, #including, #index_by, #index_with, #many?, #pluck, #sum, #without
Constructor Details
#initialize(left) ⇒ Node
Returns a new instance of Node.
13
14
15
16
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 13
def initialize(left)
@left = left
@memo = nil
end
|
Instance Attribute Details
Returns the value of attribute left
11
12
13
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 11
def left
@left
end
|
Returns the value of attribute memo
11
12
13
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 11
def memo
@memo
end
|
Instance Method Details
#cat? ⇒ Boolean
46
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 46
def cat?; false; end
|
#each(&block) ⇒ Object
18
19
20
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 18
def each(&block)
Visitors::Each::INSTANCE.accept(self, block)
end
|
#group? ⇒ Boolean
47
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 47
def group?; false; end
|
#literal? ⇒ Boolean
43
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 43
def literal?; false; end
|
34
35
36
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 34
def name
-left.tr("*:", "")
end
|
#star? ⇒ Boolean
45
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 45
def star?; false; end
|
#symbol? ⇒ Boolean
42
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 42
def symbol?; false; end
|
#terminal? ⇒ Boolean
44
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 44
def terminal?; false; end
|
26
27
28
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 26
def to_dot
Visitors::Dot::INSTANCE.accept(self)
end
|
22
23
24
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 22
def to_s
Visitors::String::INSTANCE.accept(self, "")
end
|
30
31
32
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 30
def to_sym
name.to_sym
end
|
38
39
40
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 38
def type
raise NotImplementedError
end
|