Run a runnable on inner plugin collection

Hi.
I want to expand a plugin that download language files, i want to enable running a closure on all the files that were exported.
for example:

someapi{
   lang: 'en'
   lang: 'fr'
   lang: 'he'
   preprocess:{ langFile,langCode ->
     pritnln("lang :${langCode} is at path: ${langFile.absolutePath()}")
   }
}

the problem is i know project.configure in the plugin can help me parse data closures into objects, but how can i parse the code as a method/callable i can actually run and pass parameters to ?