Skip to content

Instantly share code, notes, and snippets.

@baweaver
Created November 25, 2019 16:19
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 baweaver/d398b969c1746801770f20627a63612d to your computer and use it in GitHub Desktop.
Save baweaver/d398b969c1746801770f20627a63612d to your computer and use it in GitHub Desktop.
case { it: { works: { on: 1, nested: 'hashes' }, cool: true } }
in it: { works: { on: Integer, nested: String }, cool: TrueClass }
true
else
false
end
# => true
case [{ that: { includes: [:this, :too] }}, { more: 'splats'}, {see?: true}]
in [{ that: { includes: Array } }, *]
true
else
false
end
# => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment