Class: ZZQ::Routing::TopicTrie::Node
- Inherits:
-
Object
- Object
- ZZQ::Routing::TopicTrie::Node
- Defined in:
- lib/zzq/routing/topic_trie.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#hash_child ⇒ Object
Returns the value of attribute hash_child.
-
#plus_child ⇒ Object
Returns the value of attribute plus_child.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize ⇒ Node
Returns a new instance of Node.
36 37 38 39 40 41 |
# File 'lib/zzq/routing/topic_trie.rb', line 36 def initialize @children = {} @plus_child = nil @hash_child = nil @entries = [] end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
33 34 35 |
# File 'lib/zzq/routing/topic_trie.rb', line 33 def children @children end |
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
33 34 35 |
# File 'lib/zzq/routing/topic_trie.rb', line 33 def entries @entries end |
#hash_child ⇒ Object
Returns the value of attribute hash_child.
32 33 34 |
# File 'lib/zzq/routing/topic_trie.rb', line 32 def hash_child @hash_child end |
#plus_child ⇒ Object
Returns the value of attribute plus_child.
32 33 34 |
# File 'lib/zzq/routing/topic_trie.rb', line 32 def plus_child @plus_child end |
Instance Method Details
#empty? ⇒ Boolean
44 45 46 |
# File 'lib/zzq/routing/topic_trie.rb', line 44 def empty? @children.empty? && @plus_child.nil? && @hash_child.nil? && @entries.empty? end |