Class.{implements => implement} - like Class.extend(), we're looking for a verb
parent
5b3ecf853b
commit
c12ac412cb
|
@ -46,7 +46,7 @@ exports.extend = function( base )
|
||||||
*
|
*
|
||||||
* @return {Class} new class containing interface abstractions
|
* @return {Class} new class containing interface abstractions
|
||||||
*/
|
*/
|
||||||
exports.implements = function()
|
exports.implement = function()
|
||||||
{
|
{
|
||||||
var len = arguments.length,
|
var len = arguments.length,
|
||||||
dest = exports.extend(),
|
dest = exports.extend(),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Tests class interface implements method
|
* Tests class interface implement method
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Mike Gerwitz
|
* Copyright (C) 2010 Mike Gerwitz
|
||||||
*
|
*
|
||||||
|
@ -38,7 +38,7 @@ var Type2 = Interface.extend( {
|
||||||
|
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
( Class.implements instanceof Function ),
|
( Class.implement instanceof Function ),
|
||||||
"Class provides method to implement interfaces"
|
"Class provides method to implement interfaces"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ assert.ok(
|
||||||
|
|
||||||
assert.doesNotThrow( function()
|
assert.doesNotThrow( function()
|
||||||
{
|
{
|
||||||
Foo = Class.implements( Type, Type2 );
|
Foo = Class.implement( Type, Type2 );
|
||||||
}, Error, "Class can implement interfaces" );
|
}, Error, "Class can implement interfaces" );
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
Loading…
Reference in New Issue