Skip to content

Instantly share code, notes, and snippets.

@Papierkorb
Forked from Groogy/test.cr
Last active October 1, 2017 10:25
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 Papierkorb/48b47d318a495d401961915c63bc9d16 to your computer and use it in GitHub Desktop.
Save Papierkorb/48b47d318a495d401961915c63bc9d16 to your computer and use it in GitHub Desktop.
# Papierkorb suggestion
class Foo
include CrystalClear
requires var > 5 # Pushes "var > 5" into SOME_ARRAY
ensures result.query? # Pushes "result.query?" into SOME_ARRAY
contract def foo # Expands to the def, processes SOME_ARRAY, and clears it out for the next method
# Code
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment