-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
run
method to setup block and fix relativ paths
- Loading branch information
Showing
22 changed files
with
480 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.askimed.nf.test.lang; | ||
|
||
import groovy.lang.Closure; | ||
|
||
public class Dependency { | ||
|
||
private String script; | ||
|
||
private String name; | ||
|
||
private String mapping; | ||
|
||
public Dependency(String name, Closure closure) { | ||
this.name = name; | ||
closure.setDelegate(this); | ||
closure.setResolveStrategy(Closure.DELEGATE_FIRST); | ||
closure.call(); | ||
} | ||
|
||
public void script(String script) { | ||
this.script = script; | ||
} | ||
|
||
public String getScript() { | ||
return script; | ||
} | ||
|
||
public void setScript(String script) { | ||
this.script = script; | ||
} | ||
|
||
public void process(Closure closure) { | ||
closure.setDelegate(this); | ||
closure.setResolveStrategy(Closure.DELEGATE_FIRST); | ||
Object mapping = closure.call(); | ||
if (mapping != null) { | ||
this.mapping = mapping.toString(); | ||
} | ||
} | ||
|
||
public void workflow(Closure closure) { | ||
process(closure); | ||
} | ||
|
||
public void function(Closure closure) { | ||
process(closure); | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getMapping() { | ||
return mapping; | ||
} | ||
|
||
public void setMapping(String mapping) { | ||
this.mapping = mapping; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.