From 87f2ae6d93182ae7f57cbe4ff772b97a14db2d19 Mon Sep 17 00:00:00 2001 From: JesseBrault0709 <62299747+JesseBrault0709@users.noreply.github.com> Date: Fri, 17 May 2024 14:01:19 +0200 Subject: [PATCH] More sketching. --- web-views/sketching/.gitignore | 3 --- web-views/sketching/Greeter.groovy | 14 ++++++++++++++ web-views/sketching/Helper.groovy | 9 +++++++++ web-views/sketching/UseGreeter.wvc | 4 ++++ 4 files changed, 27 insertions(+), 3 deletions(-) delete mode 100644 web-views/sketching/.gitignore create mode 100644 web-views/sketching/Greeter.groovy create mode 100644 web-views/sketching/Helper.groovy create mode 100644 web-views/sketching/UseGreeter.wvc diff --git a/web-views/sketching/.gitignore b/web-views/sketching/.gitignore deleted file mode 100644 index e2f79fc..0000000 --- a/web-views/sketching/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.groovy -classes -.txt diff --git a/web-views/sketching/Greeter.groovy b/web-views/sketching/Greeter.groovy new file mode 100644 index 0000000..f5266af --- /dev/null +++ b/web-views/sketching/Greeter.groovy @@ -0,0 +1,14 @@ +package sketching + +import groowt.view.web.BaseWebViewComponent + +class Greeter extends BaseWebViewComponent { + + String target + + Greeter(Map attr) { + super('Hello, $target!') + this.target = attr.target ?: 'World' + } + +} diff --git a/web-views/sketching/Helper.groovy b/web-views/sketching/Helper.groovy new file mode 100644 index 0000000..d3c98c2 --- /dev/null +++ b/web-views/sketching/Helper.groovy @@ -0,0 +1,9 @@ +package sketching + +class Helper { + + void help(String s) { + s.toUpperCase() + } + +} diff --git a/web-views/sketching/UseGreeter.wvc b/web-views/sketching/UseGreeter.wvc new file mode 100644 index 0000000..c3ead55 --- /dev/null +++ b/web-views/sketching/UseGreeter.wvc @@ -0,0 +1,4 @@ +--- +package sketching +--- +