The method declaration

As is the case with all Gosu methods, you use the Gosu keyword function to declare a step method.

If the step method takes one or more parameters, then those values are typically included in the method declaration. For example:

@And("^the submission has an effective date of \"([^\"]+)\"$")
function submissionEffectiveOn(effectiveDate : String) {
_contextFactory.getSubmissionContext().setEffectiveDate(DateTransformer.transform(effectiveDate))
}

This scenario step provides a String parameter that identifies the submission's effective date. This string is then passed into the method as effectiveDate.