54d17cbf30111ad758caab37ce6cc457ef0edd1d
[feedcatcher.git] / vendor / rails / activesupport / lib / active_support / core_ext / array / random_access.rb
1 module ActiveSupport #:nodoc:
2 module CoreExtensions #:nodoc:
3 module Array #:nodoc:
4 module RandomAccess
5 # Returns a random element from the array.
6 def rand
7 self[Kernel.rand(length)]
8 end
9 end
10 end
11 end
12 end