In Ruby, on certain occasions (ruby/gosu/texplay) I'v seen code like the following used:
image.paint {
circle 20, 20
pixel 10, 10
}
Would it be possible for me to write a similar function that can be used like so?:
my_function {
"one"
"two"
"three"
}
that would return and array: ["one", "two", "three"]
p.s. this function isn't just for generating arrays and I am not wondering about methods to do so, all I need to know about is the syntax. Thanks in advance, ell.