Class: Rage::Router::ParametricNode
- Inherits:
-
ParentNode
- Object
- Node
- ParentNode
- Rage::Router::ParametricNode
- Defined in:
- lib/rage/router/node.rb
Constant Summary
Constants inherited from Node
Node::PARAMETRIC, Node::STATIC, Node::WILDCARD
Instance Attribute Summary collapse
-
#node_paths ⇒ Object
readonly
Returns the value of attribute node_paths.
-
#static_suffix ⇒ Object
readonly
Returns the value of attribute static_suffix.
Attributes inherited from ParentNode
Attributes inherited from Node
#handler_storage, #is_leaf_node, #kind
Instance Method Summary collapse
- #get_next_node(path, path_index, _, _) ⇒ Object
-
#initialize(static_suffix, node_path) ⇒ ParametricNode
constructor
A new instance of ParametricNode.
Methods inherited from ParentNode
#create_static_child, #find_static_matching_child
Methods inherited from Node
Constructor Details
#initialize(static_suffix, node_path) ⇒ ParametricNode
Returns a new instance of ParametricNode.
179 180 181 182 183 184 185 |
# File 'lib/rage/router/node.rb', line 179 def initialize(static_suffix, node_path) super() @static_suffix = static_suffix @kind = Node::PARAMETRIC @node_paths = Set.new([node_path]) end |
Instance Attribute Details
#node_paths ⇒ Object (readonly)
Returns the value of attribute node_paths.
177 178 179 |
# File 'lib/rage/router/node.rb', line 177 def node_paths @node_paths end |
#static_suffix ⇒ Object (readonly)
Returns the value of attribute static_suffix.
177 178 179 |
# File 'lib/rage/router/node.rb', line 177 def static_suffix @static_suffix end |
Instance Method Details
#get_next_node(path, path_index, _, _) ⇒ Object
187 188 189 |
# File 'lib/rage/router/node.rb', line 187 def get_next_node(path, path_index, _, _) find_static_matching_child(path, path_index) end |