SyntaxFix
Write A Post
Hire A Developer
Questions
You can try:
unless defined?(var) #ruby code goes here end => true
Because it returns a boolean.