lib/garcon/core_ext/random.rb
# Similar to #at_rand, but will return an array of randomly picked exclusive
# elements if given a number.
Similar to #at_rand, but will return an array of randomly picked exclusive
elements if given a number.
Similar to #at_rand but will return an array of randomly picked exclusive elements if given a number .
def pick(n = nil)
      if n
        a = self.dup
        a.pick!(n)
      else
        at(SecureRandom.random_number(size))
      end
    end
def pick ( n = nil ) if n a = self . dup a . pick! ( n ) else at ( SecureRandom . random_number ( size ) ) end end
Similar to #at_rand, but will return an array of randomly picked exclusive
elements if given a number.
Similar to #at_rand but will return an array of randomly picked exclusive elements if given a number .
n
<not_specific>