J
Jari Williamsson
Is it possible for a method to create new variables that becomes in the
scope of the caller (instead of the scope of the method)? I guess I mean
to get a method to behave much like macros or templates in C/C++.
Something like this:
---
def create_some_variables(varname1, varname2)
# Create the variables and initialize with values
end
create_some_variables("a", "b")
# Display the values of those variables
puts a
puts b
scope of the caller (instead of the scope of the method)? I guess I mean
to get a method to behave much like macros or templates in C/C++.
Something like this:
---
def create_some_variables(varname1, varname2)
# Create the variables and initialize with values
end
create_some_variables("a", "b")
# Display the values of those variables
puts a
puts b