Class: Array
Direct Known Subclasses
Plug::PeerList, Rbkb::Http::Headers, Rbkb::Http::NamedValueArray, Rbkb::Http::Parameters
Instance Method Summary collapse
-
#rand_elem ⇒ Object
Returns a randomly chosen element from self.
-
#randomize ⇒ Object
randomizes the order of contents in the Array (self).
Instance Method Details
#rand_elem ⇒ Object
Returns a randomly chosen element from self. Drew is sparta.
582 |
# File 'lib/rbkb/extends.rb', line 582 def rand_elem; self[rand(self.length)] ; end |
#randomize ⇒ Object
randomizes the order of contents in the Array (self)
578 |
# File 'lib/rbkb/extends.rb', line 578 def randomize ; self.sort_by { rand } ; end |