./lib/trie_compressor.rb in rambling-trie-0.3.2 vs ./lib/trie_compressor.rb in rambling-trie-0.3.3
- old
+ new
@@ -1,12 +1,11 @@
module Rambling
+ # Provides the compressing behavior for the Trie data structure.
module TrieCompressor
+ # Flag for compressed tries.
+ # @return [Boolean] `true` for compressed tries, `false` otherwise.
def compressed?
- if instance_variable_defined?(:@is_compressed)
- @is_compressed
- else
- @parent.nil? ? false : @parent.compressed?
- end
+ @parent.nil? ? false : @parent.compressed?
end
protected
def compress_own_tree!