Posts Tagged With: define

Find if a Variable is Defined in Ruby

Tagged with: , , , , , , ,

This will let you find whether a variable is defined in ruby.


if(defined? var_name) then
    print var_name + " is set"
end
No Comments »