doc: Merged and updated old docs for Hash#values.

This commit is contained in:
tjcrowder 2009-09-10 15:43:29 +01:00
parent 1910e08a79
commit 3ee5b5ddd8
1 changed files with 9 additions and 1 deletions

View File

@ -188,7 +188,15 @@ var Hash = Class.create(Enumerable, (function() {
/**
* Hash#values() -> Array
*
* Collect the values of a hash and returns them in an array.
* Collects the values of the hash and returns them in an array.
*
* The order of the values is not guaranteed.
*
* ### Example
*
* var h = $H({one: "uno", two: "due", three: "tre"});
* h.values();
* // -> ["uno", "tre", "due"] (these may be in any order)
**/
function values() {
return this.pluck('value');