Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy way to set constructor values...? #39

Open
stuffaboutpete opened this issue Apr 3, 2015 · 0 comments
Open

Easy way to set constructor values...? #39

stuffaboutpete opened this issue Apr 3, 2015 · 0 comments

Comments

@stuffaboutpete
Copy link
Owner

The following is a common pattern; is there something we can do to take away the leg work?

define(

'class MyClass',
{

    'public argOne (TypeOne)': null,
    'public argTwo (TypeTwo)': null,
    'public argThree (TypeThree)': null,

    'public construct (TypeOne, TypeTwo, TypeThree) -> undefined': function(argOne, argTwo, argThree)
    {
        this.argOne(argOne);
        this.argTwo(argTwo);
        this.argThree(argThree);
    }

});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant