Skip to content

Commit

Permalink
renamed Shrike.object to Shrike.inherit
Browse files Browse the repository at this point in the history
  • Loading branch information
alpha123 committed May 22, 2011
1 parent 48cde13 commit afce77a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/core.html
Expand Up @@ -55,7 +55,7 @@ <h1>Functions</h1>
<li><a href="#Shrike-merge">Shrike.merge</a></li>
<li><a href="#Shrike-extend">Shrike.extend</a></li>
<li><a href="#Shrike-clone">Shrike.clone</a></li>
<li><a href="#Shrike-object">Shrike.object</a></li>
<li><a href="#Shrike-inherit">Shrike.inherit</a></li>
<li><a href="#Shrike-first">Shrike.first</a></li>
<li><a href="#Shrike-inspect">Shrike.inspect</a></li>
<li><a href="#Shrike-toQueryString">Shrike.toQueryString</a></li>
Expand Down Expand Up @@ -140,8 +140,8 @@ <h3 class="exhead">Example</h3>
// obj2.strange: "fish"
</pre>
</li>
<li id="Shrike-object">
<h2 class="name">Shrike.object</h2>
<li id="Shrike-inherit">
<h2 class="name">Shrike.inherit</h2>
<span class="desc">Untangles JavaScript&apos;s inheritance mechanism. See
<a href="http://javascript.crockford.com/prototypal.html">http://javascript.crockford.com/prototypal.html</a>. Essentially creates a
new object that inherits from the passed object.</span>
Expand All @@ -154,7 +154,7 @@ <h3 class="rethead">Returns</h3>
<h3 class="exhead">Example</h3>
<pre class="ex">
var obj = {hello: function () { return 'Hello'; }},
newObj = Shrike.object(obj);
newObj = Shrike.inherit(obj);
newObj.hey = function () { return 'Hey!'; };
newObj.hello(); // "Hello"
</pre>
Expand Down
2 changes: 1 addition & 1 deletion src/core.js
Expand Up @@ -163,7 +163,7 @@ Shrike.merge(Shrike, {
},

// From http://javascript.crockford.com/prototypal.html
object: function (obj) {
inherit: function (obj) {
function F() { }
F.prototype = obj;
return new F();
Expand Down

0 comments on commit afce77a

Please sign in to comment.