module AyeCommander::Abortable
This module helps a command to stop the code flow completely and return the result immediately. It is specially useful when your command is running on more deeply nested code (Eg: private methods called by call)
It also uses, what is probably one of the most underused features of ruby: catch and throw.
Public Instance Methods
abort!()
click to toggle source
abort! throws an :abort! to stop the current command flow on its tracks
# File lib/aye_commander/abortable.rb, line 21 def abort! throw :abort!, :aborted end