groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kurt Andrews <kurt.w.andr...@gmail.com>
Subject Accessing groovy method parameters as a list
Date Thu, 04 Jun 2015 16:15:42 GMT
Can I access the method parameters as a list or array?

def sign(method, path, apiKey, userKey, algorithm) {
  // marshal message components into message...
  //   I want to access the method parameters as a list or an array
  //   and create a delimited string from the first 4 elements. Is
  //   there any way to get at the method parameter list directly or
  //   do I need to build the list from the individual parameters?

  def message = ""

  return (hash_hmac(algorithm, apiKey, message).encodeBase64().toString())
}

Mime
View raw message