Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/gabbler/generator.rb

Instance Method Summary collapse

Instance Method Details

#sampleObject

Comes with Ruby 1.9+



8
9
10
# File 'lib/gabbler/generator.rb', line 8

def sample # Comes with Ruby 1.9+
  self[rand(size)]
end