Command Line Execution
glue.bat / glue.sh [parameters] script.glue
parameters:
- path=string;string;...
- debug=boolean
- trace=boolean
- markdown=boolean |
Data Types
integer |
-256 |
decimal |
-256.15 |
string |
"string", 'string' |
boolean |
true, false |
arrays |
[value, ...] |
tuple |
(value, ...) ¹ |
map |
map(key1, key2, tuple(value1, value2), tuple(value1, value2) )² |
resource |
string('filename') |
¹ immutable array
² access tuple in map can be done like this:
for (record : map)
echo(record/key1)
Statements
If Statement
if (expression)
statements
Switch Statement
switch (expression)
case value
statements
case value
statements
For Loop
for (list)
statements($value)
for (val : list)
statements(val)
for (10)
statements($index)
|
|
|
Test Methods
confirm/validateNull(message, result) |
confirm/validate the result is null¹ |
confirm/validateTrue(message, result) |
confirm/validate result equals 'true'¹ |
confirm/validateMatches(message, regex, actual) |
confirm/validate the actual value matches the given regex¹ |
confirm/validateContains(message, regex, actual) |
confirm/validate the actual value contains the given regex¹ |
confirm/validateEquals(message, expected, actual) |
confirm/validate the actual value is equal to the expected value¹ |
not(boolean) |
inverse the value of the boolean |
¹ confirm methods stops the script when result is false
validate methods continue the script when result is false
Script Methods
echo(messages) |
show the messages in the terminal |
debug(messages) |
show the messages when in debug mode |
|
|
String Methods
padRight(pad, len, strings) |
add character to end of string until len is reached |
padLeft(pad, len, strings) |
add character to beginning of string until len is reached |
pad(pad, len, location, strings) |
add character to location of string until len is reached |
upper(strings) |
uppercases the strings |
lower(strings) |
lowercases the strings |
substring(string, start, stop) |
retrieves a substring of the given string |
replace(regex, replacement, strings) |
replaces regex with replacement in the given strings |
find(regex, strings) |
find the regex in the given strings |
lines(strings) |
return the number of lines in strings |
columns(strings) |
return the number of columns in strings, splitted by '\t' and ';' |
trim(strings) |
removes leading and trailing spaces |
join(separator, strings) |
combines given strings adding the separator in between |
split(regex, strings) |
splits the given strings using the regex |
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment