Method: Cond::DSL#leave

Defined in:
lib/cond/dsl_definition.rb

#leave(*args) ⇒ Object

Leave the current handling or restartable block, optionally providing a value for the block.

The semantics are the same as ‘return’. When given multiple arguments, it returns an array. When given one argument, it returns only that argument (not an array).



49
50
51
52
# File 'lib/cond/dsl_definition.rb', line 49

def leave(*args)
  Cond.check_context(:leave)
  Cond.code_section_stack.last.leave(*args)
end