Skip to content

Commit

Permalink
Merge pull request #316 from iberianpig/feature/compare_index
Browse files Browse the repository at this point in the history
Enable Comparison of Index Records in Fusuma
  • Loading branch information
iberianpig authored Jan 19, 2024
2 parents dc9f931 + 7d520a9 commit ddb430d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/fusuma/config/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ddb430d

Please sign in to comment.