Skip to content

Commit 340cdbc

Browse files
author
R. Tyler Croy
authored
Merge pull request #51 from onceking/master
add `return this;` to load-from-file
2 parents 7a8ec90 + 544c127 commit 340cdbc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// If there's a call method, you can just load the file, say, as "foo", and then invoke that call method with foo(...)
22
def call(String whoAreYou) {
33
echo "Now we're being called more magically, ${whoAreYou}, thanks to the call(...) method."
4-
}
4+
}
5+
6+
return this;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// Methods in this file will end up as object methods on the object that load returns.
22
def lookAtThis(String whoAreYou) {
33
echo "Look at this, ${whoAreYou}! You loaded this from another file!"
4-
}
4+
}
5+
6+
return this;

0 commit comments

Comments
 (0)