Skip to content

Instantly share code, notes, and snippets.

@jdelStrother
Last active December 18, 2015 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdelStrother/5728010 to your computer and use it in GitHub Desktop.
Save jdelStrother/5728010 to your computer and use it in GitHub Desktop.
hash = {x: {y: 2, z:{qw:1, rt:e}}, a:1, b:2}
deep_3_finder = ->((k,v)){ v.is_a?(Hash) ? v.any?(&deep_3_finder) : v==3 }
hash.any?(&deep_3_finder)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment