joosex-class-simpleconstructor

0.4.0 • Public • Published

Name

JooseX.Class.SimpleConstructor - a trait for class, making the 'new' keyword optional during instantiation

SYNOPSIS

    Class('Some.Class', {
        
        trait : JooseX.Class.SimpleConstructor,
        
        has : {
            ...
        },
        
        methods : {
            ...
        }
    
    })
    
    // no need in `new`
    var instance = Some.Class()
    
    var check = instance instanceOf Some.Class // true

DESCRIPTION

JooseX.Class.SimpleConstructor is a very simple trait, which makes the new keyword optional for instantiation. The class constructor will just return a new instance every time. This trait should be applied last among all your traits, modifying the constructor behavior.

GETTING HELP

This extension is supported via github issues tracker: http://github.com/SamuraiJack/JooseX-Class-SimpleConstructor/issues

For general Joose questions you can also visit #joose on irc.freenode.org or the forum at: http://joose.it/forum

SEE ALSO

Web page of this module: http://github.com/SamuraiJack/JooseX-Class-SimpleConstructor/

General documentation for Joose: http://Joose.github.com/Joose

BUGS

All complex software has bugs lurking in it, and this module is no exception.

Please report any bugs through the web interface at http://github.com/SamuraiJack/JooseX-Class-SimpleConstructor/issues

AUTHORS

Nickolay Platonov nplatonov@cpan.org

COPYRIGHT AND LICENSE

This software is Copyright (c) 2010 by Nickolay Platonov nplatonov@cpan.org.

This is free software, licensed under:

The GNU Lesser General Public License, Version 3, June 2007

Readme

Keywords

none

Package Sidebar

Install

npm i joosex-class-simpleconstructor

Weekly Downloads

1

Version

0.4.0

License

none

Last publish

Collaborators

  • samuraijack