Hi:
I have a program that takes several parameters from the command line.
I need to test these parameters that:
1) they exist
2) they are not nil
3) they are not empty
So, in my code I have
if !defined?(param) || param.nil? || param.empty?
# err
end
Is there a more compact way to test for this?
I thought about making a function for this but
I'm not sure how to pass an undefined param to a function.
Jim
=========================================================
Jim Freeze
jim / freeze.org
---------------------------------------------------------
No comment at this time.
http://www.freeze.org
=========================================================