After looking at the Origen Parameters feature, I was wondering if it is possible to dynamically pass variables as names within the parameter scope. For example:
[:tprog, :terase].each do |p|
define_params :default do |params|
params.send(p, 20.uS)
end
end
thx
Yes it's possible.
Your example doesn't work as written though since the method you are trying to call to define the parameter is tprog=
and not just tprog
.
So this would work:
[:tprog, :terase].each do |p|
define_params :default do |params|
params.send("#{p}=", 20.us)
end
end
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments