Ruby support #1
5 changed files with 20 additions and 4 deletions
7
assets/tests/ruby/call_script_function_with_params.rb
Normal file
7
assets/tests/ruby/call_script_function_with_params.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
STATE = {
|
||||||
|
"called_with" => nil
|
||||||
|
}
|
||||||
|
|
||||||
|
def test_func(x)
|
||||||
|
called_with = x
|
||||||
|
end
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
def test_func
|
def test_func
|
||||||
rust_func(5, "test")
|
rust_func(5, "test")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
def test_func
|
def test_func
|
||||||
rust_func(5)
|
rust_func(5)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
STATE = {
|
||||||
|
'a_value' => nil,
|
||||||
|
'b_value' => nil
|
||||||
|
}
|
||||||
|
|
||||||
|
def test_func(a, b)
|
||||||
|
STATE['a_value'] = a
|
||||||
|
STATE['b_value'] = b
|
||||||
|
end
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
STATE = {
|
STATE = {
|
||||||
"a_value" => nil
|
"a_value" => nil
|
||||||
}
|
}
|
||||||
|
|
||||||
def test_func(a)
|
def test_func(a)
|
||||||
STATE["a_value"] = a
|
STATE["a_value"] = a
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue