lib/garcon/core_ext/random.rb
# Deletes a random key-value pair and returns the value.
#
# @example
#   a = {:one => 1, :two => 2, :three => 3}
#   a.at_rand!  # => 2
#   a           # => {:one => 1, :three => 3}
#
Deletes a random key-value pair and returns the value.
Deletes a random key - value pair and returns the value .
def rand_value!
      k,v = rand_pair
      delete(k)
      return v
    end
def rand_value! k , v = rand_pair delete ( k ) return v end
Deletes a random key-value pair and returns the value.
Deletes a random key - value pair and returns the value .
example
None