Skip to content

Instantly share code, notes, and snippets.

@timfel
Created May 25, 2010 10:10
Show Gist options
  • Save timfel/412975 to your computer and use it in GitHub Desktop.
Save timfel/412975 to your computer and use it in GitHub Desktop.
(Object allMethodsInCategory: 'testing')
select: [:m |
(m asString beginsWith: 'is') and:
[(m asString endsWith: ':') not]]
thenDo: [:each |
Object compile: (each asString
copyReplaceAll: 'is' with: 'if'), ': aBlock
^ self ', each asString, ' ifTrue: aBlock'.
Object organization
classify: each
under: 'conditional-blocks'].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment