@@ -14,10 +14,10 @@ module Radix
1414 # methods within `Tree`.
1515 #
1616 # ```
17- # node = Node.new("/", :root)
18- # node.children << Node.new("a", :a)
19- # node.children << Node.new("bc", :bc)
20- # node.children << Node.new("def", :def)
17+ # node = Radix:: Node.new("/", :root)
18+ # node.children << Radix:: Node.new("a", :a)
19+ # node.children << Radix:: Node.new("bc", :bc)
20+ # node.children << Radix:: Node.new("def", :def)
2121 # node.sort!
2222 #
2323 # node.priority
@@ -42,16 +42,16 @@ module Radix
4242 # * Any other type of key will receive priority based on its size.
4343 #
4444 # ```
45- # Node(Nil).new("a").priority
45+ # Radix:: Node(Nil).new("a").priority
4646 # # => 1
4747 #
48- # Node(Nil).new("abc").priority
48+ # Radix:: Node(Nil).new("abc").priority
4949 # # => 3
5050 #
51- # Node(Nil).new("*filepath").priority
51+ # Radix:: Node(Nil).new("*filepath").priority
5252 # # => 0
5353 #
54- # Node(Nil).new(":query").priority
54+ # Radix:: Node(Nil).new(":query").priority
5555 # # => 1
5656 # ```
5757 getter priority : Int32
@@ -66,13 +66,13 @@ module Radix
6666 #
6767 # ```
6868 # # Good, node type is inferred from payload (Symbol)
69- # node = Node.new("/", :root)
69+ # node = Radix:: Node.new("/", :root)
7070 #
7171 # # Good, node type is now Int32 but payload is optional
72- # node = Node(Int32).new("/")
72+ # node = Radix:: Node(Int32).new("/")
7373 #
7474 # # Error, node type cannot be inferred (compiler error)
75- # node = Node.new("/")
75+ # node = Radix:: Node.new("/")
7676 # ```
7777 def initialize (@key : String , @payload : T ? = nil , @placeholder = false )
7878 @children = [] of Node (T )
@@ -82,7 +82,7 @@ module Radix
8282 # Changes current *key*
8383 #
8484 # ```
85- # node = Node(Nil).new("a")
85+ # node = Radix:: Node(Nil).new("a")
8686 # node.key
8787 # # => "a"
8888 #
@@ -94,7 +94,7 @@ module Radix
9494 # This will also result in a new priority for the node.
9595 #
9696 # ```
97- # node = Node(Nil).new("a")
97+ # node = Radix:: Node(Nil).new("a")
9898 # node.priority
9999 # # => 1
100100 #
@@ -129,11 +129,11 @@ module Radix
129129 # This ensures highest priority nodes are listed before others.
130130 #
131131 # ```
132- # root = Node(Nil).new("/")
133- # root.children << Node(Nil).new("*filepath") # node.priority => 0
134- # root.children << Node(Nil).new(":query") # node.priority => 1
135- # root.children << Node(Nil).new("a") # node.priority => 1
136- # root.children << Node(Nil).new("bc") # node.priority => 2
132+ # root = Radix:: Node(Nil).new("/")
133+ # root.children << Radix:: Node(Nil).new("*filepath") # node.priority => 0
134+ # root.children << Radix:: Node(Nil).new(":query") # node.priority => 1
135+ # root.children << Radix:: Node(Nil).new("a") # node.priority => 1
136+ # root.children << Radix:: Node(Nil).new("bc") # node.priority => 2
137137 # root.sort!
138138 #
139139 # root.children.map &.priority
0 commit comments