doc: Merged old docs for Hash#keys, updated example.

This commit is contained in:
tjcrowder 2009-09-10 15:00:34 +01:00
parent e02a1cf5c6
commit 305e79e5d3

View File

@ -138,7 +138,15 @@ var Hash = Class.create(Enumerable, (function() {
/**
* Hash#keys() -> [String...]
*
* Provides an Array of keys (that is, property names) for the hash.
* Provides an Array containing the keys for items stored in the hash.
*
* The order of the keys is not guaranteed.
*
* ### Example
*
* var h = $H({one: "uno", two: "due", three: "tre"});
* h.keys();
* // -> ["one", "three", "two] (these may be in any order)
**/
function keys() {
return this.pluck('key');