1
0
Fork 0
easejs/scripts/ex/interface-2.js

26 lines
505 B
JavaScript

var ConcreteFilesystem = Class( 'ConcreteFilesystem' )
.implement( Filesystem ) // multiple interfaces as separate arguments
{
'public open': function( path, mode )
{
return { path: path, mode: mode };
},
'public read': function( handle, length )
{
return "";
},
'public write': function( handle, data )
{
// ...
return data.length;
},
'public close': function( handle )
{
// ...
return this;
},
} );