Class: Array

Inherits:
Object show all
Defined in:
lib/small/array.rb

Instance Method Summary collapse

Instance Method Details

#extract_options!Object



3
4
5
# File 'lib/small/array.rb', line 3

def extract_options!
  last.is_a?(Hash) ? pop : {}
end

#sampleObject



7
8
9
# File 'lib/small/array.rb', line 7

def sample
  self[Kernel.rand(size)]
end