module Rambling::Trie::Comparable
Provides the comparable behavior for the trie data structure.
Public Instance Methods
==(other)
click to toggle source
Compares two nodes. @param [Nodes::Node] other the node to compare against. @return [Boolean] `true` if the nodes' {Nodes::Node#letter letter} and
{Nodes::Node#children_tree #children_tree} are equal, `false` otherwise.
# File lib/rambling/trie/comparable.rb, line 12 def == other letter == other.letter && terminal? == other.terminal? && children_tree == other.children_tree end