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.
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
107
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 107
def cat?; false; end
|
#each(&block) ⇒ Object
79
80
81
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 79
def each(&block)
Visitors::Each::INSTANCE.accept(self, block)
end
|
#group? ⇒ Boolean
108
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 108
def group?; false; end
|
#literal? ⇒ Boolean
104
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 104
def literal?; false; end
|
#name ⇒ Object
95
96
97
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 95
def name
-left.tr("*:", "")
end
|
#star? ⇒ Boolean
106
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 106
def star?; false; end
|
#symbol? ⇒ Boolean
103
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 103
def symbol?; false; end
|
#terminal? ⇒ Boolean
105
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 105
def terminal?; false; end
|
#to_dot ⇒ Object
87
88
89
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 87
def to_dot
Visitors::Dot::INSTANCE.accept(self)
end
|
#to_s ⇒ Object
83
84
85
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 83
def to_s
Visitors::String::INSTANCE.accept(self, "")
end
|
#to_sym ⇒ Object
91
92
93
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 91
def to_sym
name.to_sym
end
|
#type ⇒ Object
99
100
101
|
# File 'lib/action_dispatch/journey/nodes/node.rb', line 99
def type
raise NotImplementedError
end
|