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