I'm working on the project. I currently have a rather large conditional statement that assigns a value to a variable based on some input parameters. So, I have something like this.
if some condition
x = some value
elsif another condition
x = a different value
...
What is the best way to reorganize this? I hope that I can get something like
x = some value if some condition || another value if another condition
Is there a sample for this kind of thing?
source
share