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
Constructor Details
#initialize(left) ⇒ Node
Returns a new instance of Node.
73
74
75
76
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 73
def initialize(left)
@left = left
@memo = nil
end
|
Instance Attribute Details
Returns the value of attribute left
71
72
73
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 71
def left
@left
end
|
Returns the value of attribute memo
71
72
73
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 71
def memo
@memo
end
|
Instance Method Details
#cat? ⇒ Boolean
106
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 106
def cat?; false; end
|
#each(&block) ⇒ Object
78
79
80
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 78
def each(&block)
Visitors::Each::INSTANCE.accept(self, block)
end
|
#group? ⇒ Boolean
107
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 107
def group?; false; end
|
#literal? ⇒ Boolean
103
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 103
def literal?; false; end
|
94
95
96
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 94
def name
-left.tr("*:", "")
end
|
#star? ⇒ Boolean
105
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 105
def star?; false; end
|
#symbol? ⇒ Boolean
102
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 102
def symbol?; false; end
|
#terminal? ⇒ Boolean
104
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 104
def terminal?; false; end
|
86
87
88
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 86
def to_dot
Visitors::Dot::INSTANCE.accept(self)
end
|
82
83
84
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 82
def to_s
Visitors::String::INSTANCE.accept(self, "")
end
|
90
91
92
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 90
def to_sym
name.to_sym
end
|
98
99
100
|
# File 'actionpack/lib/action_dispatch/journey/nodes/node.rb', line 98
def type
raise NotImplementedError
end
|