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

This commit is contained in:
tjcrowder 2009-09-10 15:18:05 +01:00
parent 64cd05dd59
commit 48a0f5a44c
1 changed files with 9 additions and 1 deletions

View File

@ -143,7 +143,15 @@ var Hash = Class.create(Enumerable, (function() {
/**
* Hash#toObject() -> Object
*
* Returns a cloned, vanilla object.
* Returns a cloned, vanilla object whose properties (and property values)
* match the keys (and values) from the hash.
*
* ### Example
*
* var h = new Hash({ a: 'apple', b: 'banana', c: 'coconut' });
* var obj = h.toObject();
* obj.a;
* // -> "apple"
**/
function toObject() {
return Object.clone(this._object);