lib/banana/logger.rb
# Calls the block with the given prefix and ensures that the prefix
# will be the same as before.
#
# @param [String] prefix Prefix to use for the block
# @param [Proc] block Block to call
Calls the block with the given prefix and ensures that the prefix
will be the same as before.
Calls the block with the given prefix and ensures that the prefix will be the same as before .
def ensure_prefix prefix, &block
      old_prefix, @prefix = @prefix, prefix
      block.call
    ensure
      @prefix = old_prefix
    end
def ensure_prefix prefix , & block old_prefix , @prefix = @prefix , prefix block . call ensure @prefix = old_prefix end
Calls the block with the given prefix and ensures that the prefix
will be the same as before.
Calls the block with the given prefix and ensures that the prefix will be the same as before .
prefix
<not_specific>
block
<not_specific>
<not_specific>
block Block to call
block Block to call