Skip to content

Instantly share code, notes, and snippets.

@avdi
Forked from MichaelXavier/aborting_composed_method.rb
Last active December 12, 2015 06:59
Show Gist options
  • Save avdi/4733343 to your computer and use it in GitHub Desktop.
Save avdi/4733343 to your computer and use it in GitHub Desktop.
# If you don't want to force the composed methods to raise exceptions,
# have them take a block specifying the failure action
def composed_method
frobulate_widgets { return false }
refrobulate_widgets { return false }
confribulate_frobulations { return false }
true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment