<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitignore</filename>
    </added>
    <added>
      <filename>Rakefile</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,46 +1,108 @@
-== JavaScript MOP Utilities
+= JavaScript MOP Utilities
 
-Defines some utilities for JavaScript metaprogramming:
+Defines some utilities for JavaScript metaprogramming.  See the specs
+for examples.
 
-  MOP.delegate(target, propertyName, methods)
-    For each name in `methods`, defines a method on `target` with this
-    name, that delegates to the method of the `propertyName` property
-    of `target` with the same name.
+== Method Definition Methods
 
-And these for asynchronous metaprogramming:
+  MOP.Object(object).accessor(propertyName)
+  MOP.Class(klass).accessor(propertyName)
+
+Attaches +getXXX+ and +setXXX+ to +object+ or to
+&lt;code&gt;klass.prototype&lt;/code&gt;.  +XXX+ is the capitalized form of
++propertyName+; for example, +name+ generates +getName+ and +setName+.
+
+  MOP.Object(object).getter(propertyName)
+  MOP.Class(klass).getter(propertyName)
+
+Attaches +getXXX+ to +object+ or to &lt;code&gt;klass.prototype&lt;/code&gt;.
++XXX+ is the capitalized form of +propertyName+; for example, +name+
+generates +getName+.
+
+  MOP.Object(object).delegate(propertyName, methods)
+  MOP.Class(klass).delegate(propertyName, methods)
+
+For each name in +methods+, defines a method on +object+ or
+&lt;code&gt;klass.prototype&lt;/code&gt; with this name, that delegates to the
+method of the +propertyName+ property of +object+ with the same name.
+
+
+== Method Wrapper Methods
+
+  MOP.Object(object).method(methodName).guardBy(guardFn)
+  MOP.Class(klass).method(methodName).guardBy(guardFn)
+
+Replaces &lt;code&gt;object.methodName&lt;/code&gt; by a method that calls the
+underlying method only if +guardFn+, applied to the same arguments,
+returns a true value.
+
+  MOP.Object(object).method(methodName).guardUntil(guardFn, ms)
+  MOP.Class(klass).method(methodName).guardUntil(guardFn, ms)
+
+A call to &lt;code&gt;object.methodName&lt;/code&gt; causes a timer to
+periodically call +guardFn+ until it returns a true value, at which
+point the underlying function is called, and the timer stops.
+
+  MOP.Object(object).method(methodName).time(guardFn)
+  MOP.Class(klass).method(methodName).time(guardFn)
+
+Replaces &lt;code&gt;object.methodName&lt;/code&gt; by a method that calls the
+underlying function, and prints to the console the name of the method
+and the time it took to execute.
+
+  MOP.Object(object).method(methodName).trace(guardFn)
+  MOP.Class(klass).method(methodName).trace(guardFn)
+
+Replaces &lt;code&gt;object.methodName&lt;/code&gt; by a method that calls the
+underlying function, and prints to the console the name of the method
+and its return value.
+
+
+== Temporary Method Replacement
 
   new MOP.MethodReplacer(object, methods)
-    When a new MethodReplacer is constructed, it replaces each method
-    on `object` by the method in `methods` with the same key value, if
-    such a method exists.  A MethodReplacer has a single method,
-    `restore`, which restores each method to its pre-replacement
-    value.
+
+When a new MethodReplacer is constructed, it replaces each method
+on +object+ by the method in +methods+ with the same key value, if
+such a method exists.  A MethodReplacer has a single method,
++restore+, which restores each method to its pre-replacement
+value.
+
+  MOP.withMethodOverridesCallback(object, methods, k)
+
+Calls +fn+ on +object+, within a dynamic scope within which the
+methods in +methods+ have temporarily replaced the like-named
+methods on +object+.  The scope is terminated by the argument to
+the call to +k+; this argument should be treated as a
+continuation, and restores the methods.
+
+
+== Method Call Serialization
 
   new MOP.QueueBall(object, methodNames)
-    When a new QueueBall is constructed, it replaces each method named
-    by `methodNames` with a method that enqueues the method call (the
-    name of the method and its arguments).  A QueueBall has a single
-    method, `replayMethodCalls`, which plays back the method calls and
-    restores the methods.
 
-  MOP.withMethodOverridesCallback(object, methods, fn)
-    Calls `fn` on `object`, within a dynamic scope within which the
-    methods in `methods` have temporarily replaced the like-named
-    methods on `object`.  The scope is terminated by the argument to
-    the call to `fn`; this argument should be treated as a
-    continuation, and restores the methods.
+When a new QueueBall is constructed, it replaces each method named
+by +methodNames+ with a method that enqueues the method call (the
+name of the method and its arguments).  A QueueBall has a single
+method, +replayMethodCalls+, which plays back the method calls and
+restores the methods.
+
+  MOP.withDeferredMethods(object, methodNames, k)
+
+Calls +fn+ on +object+, within a dynamic scope within which the
+methods in +methodNames+ have been enqueued.  The scope is
+terminated by the argument to the call to +k+; this argument
+should be treated as a continuation, and ends the queue, replaying
+the methods.
 
-  MOP.withDeferredMethods(object, methodNames, fn)
-    Calls `fn` on `object`, within a dynamic scope within which the
-    methods in `methodNames` have been enqueued.  The scope is
-    terminated by the argument to the call to `fn`; this argument
-    should be treated as a continuation, and ends the queue, replaying
-    the methods.
 
+== Repository
 
-See the specs for examples.
+Download from http://github.com/osteele/mop-js, or clone from
+  git clone http://github.com/osteele/mop-js.git
 
 
 == License
 
-Copyright 2007-2008 by Oliver Steele.  Available under the MIT License.
+Copyright 2007-2008 by Oliver Steele.  All rights reserved.
+Available under the MIT License.</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,8 @@
 &lt;body&gt;
 More examples are in &lt;a
 href=&quot;../spec/mop-specs.html&quot;&gt;mop-specs.html&lt;/a&gt;.  This file has
-examples that the test suite framework doesn't currently support.
-They write their results to the console.
+examples that the test suite framework doesn't currently support,
+because they run asynchronously or because they write their results
+to the console.  Check the console to see the run results.
 &lt;/body&gt;
 &lt;/html&gt;</diff>
      <filename>examples/mop-examples.html</filename>
    </modified>
    <modified>
      <diff>@@ -18,19 +18,20 @@ MOP = {
             return {
                 guardBy: function(guard) {
                     return replaceBy(function() {
-                        return guard() &amp;&amp; fn.apply(this, arguments);
+                        if (!guard.apply(this, arguments)) return;
+                        fn.apply(this, arguments);
                     });
                 },
                 guardUntil: function(guard, ms) {
                     ms = ms || 1000;
                     return replaceBy(function() {
-                        var self = this,
+                        var thisObject = this,
                             args = Array.prototype.slice.call(arguments, 0),
                             timer = setInterval(function() {
-                                if (!guard()) return;
+                                if (!guard.apply(thisObject, args)) return;
                                 clearInterval(timer);
                                 restore();
-                                fn.apply(self, args);
+                                fn.apply(thisObject, args);
                             }, ms);
                         return timer;
                     });
@@ -149,25 +150,25 @@ MOP = {
         }
     },
     
-    /** Calls `fn` on `object`, within a dynamic scope within
+    /** Calls `k` on `object`, within a dynamic scope within
       * which the methods in `methods` have temporarily replaced
       * the like-named methods on `object`.
       * The scope is terminated by the argument to the call to
-      * `fn`; this argument should be treated as a continuation,
+      * `k`; this argument should be treated as a continuation,
       * and restores the methods. */
-    withMethodOverridesCallback: function(object, methods, fn) {
-        if (!methods) return fn.call(object, function() {});
+    withMethodOverridesCallback: function(object, methods, k) {
+        if (!methods) return k.call(object, function() {});
         var replacer = new MOP.MethodReplacer(object, methods);
-        return fn.call(object, replacer.restore);
+        return k.call(object, replacer.restore);
     },
     
-    /** Calls `fn` on `object`, within a dynamic scope within
+    /** Calls `k` on `object`, within a dynamic scope within
       * which the methods in `methodNames` have been enqueued.
       * The scope is terminated by the argument to the call to
-      * `fn`; this argument should be treated as a continuation,
+      * `k`; this argument should be treated as a continuation,
       * and ends the queue, replaying the methods. */
-    withDeferredMethods: function(object, methodNames, fn) {
+    withDeferredMethods: function(object, methodNames, k) {
         var qball = new MOP.QueueBall(object, methodNames);
-        return fn.call(object, qball.replayMethodCalls);
+        return k.call(object, qball.replayMethodCalls);
     }
 }</diff>
      <filename>lib/mop-utilities.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>506acb13b61719cda32c836183636d91175f9b5f</id>
    </parent>
  </parents>
  <author>
    <name>Oliver Steele</name>
    <email>steele@osteele.com</email>
  </author>
  <url>http://github.com/osteele/mop-js/commit/453c22fd9b9492554b68991c5258757611280c50</url>
  <id>453c22fd9b9492554b68991c5258757611280c50</id>
  <committed-date>2008-04-19T08:14:34-07:00</committed-date>
  <authored-date>2008-04-19T08:14:34-07:00</authored-date>
  <message>more docs</message>
  <tree>9e4f9b9c9f2020cc7eb3f33f536706480b580e84</tree>
  <committer>
    <name>Oliver Steele</name>
    <email>steele@osteele.com</email>
  </committer>
</commit>
