diff --git a/lib/fusuma/config/index.rb b/lib/fusuma/config/index.rb index 0788176..b067373 100644 --- a/lib/fusuma/config/index.rb +++ b/lib/fusuma/config/index.rb @@ -14,7 +14,7 @@ def initialize(keys) key = Key.new(key) if !key.is_a? Key @keys << key key.symbol - end.join(",") + end.join(",").to_sym else key = Key.new(keys) @cache_key = key.symbol @@ -26,6 +26,12 @@ def to_s @keys.map(&:inspect) end + def ==(other) + return false unless other.is_a? Index + + cache_key == other.cache_key + end + attr_reader :keys, :cache_key # Keys in Index