Created
August 31, 2021 03:51
-
-
Save westonganger/f6c6743c774025e0aeb1cf09facbb8de to your computer and use it in GitHub Desktop.
Ruby FetchHash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################## FetchHash - ALL VALUE FETCHING OCCURS USING FETCH METHOD WHICH RAISES ERROR IF KEY NOT FOUND | |
class FetchHash < HashWithIndifferentAccess | |
def [](k) | |
self.fetch(k) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment