Forum Discussion
ameehl
12 years agoNew Contributor
Martin,
Have you found a way to add parameters to the constructor?
So:
def constructor(someString, contextIn, testRunnerIn, logIn){
this.context = contextIn;
this.testRunner = testRunnerIn;
this.log = logIn;
log.info someString;
}
...
context.setProperty( "Template", new Template(someString, context, testRunner, log) ); ?
------------------
module.run("foo", testRunner, context); ?
def example = context.Template("foor"); ?
------------------
I've tried the shown method, and have had no success.
Thanks,
-Drew
Have you found a way to add parameters to the constructor?
So:
def constructor(someString, contextIn, testRunnerIn, logIn){
this.context = contextIn;
this.testRunner = testRunnerIn;
this.log = logIn;
log.info someString;
}
...
context.setProperty( "Template", new Template(someString, context, testRunner, log) ); ?
------------------
module.run("foo", testRunner, context); ?
def example = context.Template("foor"); ?
------------------
I've tried the shown method, and have had no success.
Thanks,
-Drew
Related Content
- 9 years ago
- 4 years ago
- 3 years ago
- 7 years ago
Recent Discussions
- 18 days ago