Possible Duplicate:
What does ||= (or equals) mean in Ruby?
What does ||= mean?
I have just started learning RubyMotion and in a lot of examples I see the ||=
syntax. What does this mean?
Here is an example:
def window
@window ||= begin
w = UIWindow.alloc.initWithFrame UIScreen.mainScreen.bounds
w.rootViewController = @navigationController
w
end
It is difficult to search symbols, google ignored the symbols in my query.