Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,11 @@
|
|||
class Example {
|
||||
def foo(value) {
|
||||
"Invoked with '$value'"
|
||||
}
|
||||
}
|
||||
|
||||
def example = new Example()
|
||||
def method = "foo"
|
||||
def arg = "test value"
|
||||
|
||||
assert "Invoked with 'test value'" == example."$method"(arg)
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
procedure main()
|
||||
x := foo() # create object
|
||||
x.m1() # static call of m1 method
|
||||
# two examples where the method string can be dynamically constructed ...
|
||||
"foo_m1"(x) # ... need to know class name and method name to construct name
|
||||
x.__m["m1"] # ... general method (better)
|
||||
end
|
||||
|
||||
class foo(a,b,c) # define object
|
||||
method m1(x)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue