Skip to content

Instantly share code, notes, and snippets.

View leastbad's full-sized avatar
🤠
Keeping it real for the rest of us.

leastbad leastbad

🤠
Keeping it real for the rest of us.
View GitHub Profile
module IndexableByHashPatch
refine Array do
def to_proc
->(h) { length == 1 ? h[first] : h.values_at(*self) }
end
end
end
using IndexableByHashPatch