com.stanfy.helium.dsl.HeliumScript.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of helium Show documentation
Show all versions of helium Show documentation
DSL and Java API for REST API specification
package com.stanfy.helium.dsl
/**
* Spec script base type.
*/
abstract class HeliumScript extends Script {
/** DSL instance. */
private ProjectDsl project
public void setProject(final ProjectDsl dsl) {
this.project = dsl
}
@Override
def invokeMethod(String name, Object args) {
try {
return super.invokeMethod(name, args)
} catch (MissingMethodException e) {
if (name == e.method) {
project.invokeMethod(name, args)
} else {
throw e
}
}
}
}