I have this method
def forest(sword, armour, ring)
with its arguments having true
or false
values, which I declare in the main program as
forest false, false, false
If during the program sword=true && armour=true
, is there any way for Ruby to automatically assess whether the arguments are true or false?
Could I write something like
forest sword-truth-value, armour-truth-value, ring-truth-value?
The program I'm writing is very long and it would take too many code lines to take every single case into consideration.
Thanks for the help!