Skip to content

Commit

Permalink
lookup hierarchy for parent definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
wujibear committed Dec 17, 2022
1 parent 83e926e commit 1ea9064
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/cache_crispies/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ def self.file_hashes
# @param proc [Proc] a Proc to execute on serializable keys
# @return [Proc] a Proc to execute on the keys
def self.transform_keys(proc = nil)
@@transform_keys ||= proc
return @transform_keys ||= proc if proc.present? || @transform_keys.present?

self.superclass.transform_keys if self.superclass.respond_to?(:transform_keys)
end

private
Expand Down

0 comments on commit 1ea9064

Please sign in to comment.