All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stanfy.helium.dsl.HeliumScript.groovy Maven / Gradle / Ivy

There is a newer version: 0.6.0
Show newest version
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
      }
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy