How do I write this multi-line, complex condition if statement in Ruby?
if ( (aa != nil && self.prop1 == aa.decrypt)
|| (bb != nil && self.prop2 == bb.decrypt)
) && (self.id.nil? || self.id != id)
return true
end
I'm getting Syntax error; unexpected tOROP
.
In Java, I could write
if (
( (aa != null && aa.prop1.equals(aa.decrypt()))
|| (bb != null && bb.prop2.equals(bb.decrypt()))
)
&& (this.id != id)
) {
return true;
}