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, #exclude?, #index_by, #many?, #sum
Constructor Details
#initialize(left) ⇒ Node
Returns a new instance of Node.
11
12
13
14
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 11
def initialize(left)
@left = left
@memo = nil
end
|
Instance Attribute Details
Returns the value of attribute left
9
10
11
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 9
def left
@left
end
|
Returns the value of attribute memo
9
10
11
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 9
def memo
@memo
end
|
Instance Method Details
#each(&block) ⇒ Object
16
17
18
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 16
def each(&block)
Visitors::Each.new(block).accept(self)
end
|
#literal? ⇒ Boolean
41
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 41
def literal?; false; end
|
32
33
34
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 32
def name
left.tr '*:', ''
end
|
#symbol? ⇒ Boolean
40
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 40
def symbol?; false; end
|
24
25
26
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 24
def to_dot
Visitors::Dot.new.accept(self)
end
|
20
21
22
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 20
def to_s
Visitors::String.new.accept(self)
end
|
28
29
30
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 28
def to_sym
name.to_sym
end
|
36
37
38
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 36
def type
raise NotImplementedError
end
|