Conditional Assignment Operator
a ||= nil # => nil
a ||= 0 # => 0
a ||= 2 # => 0
If a
is undefined or false, the assign b
to a
, otherwise do nothing
Conditional Assignment Operator
a ||= nil # => nil
a ||= 0 # => 0
a ||= 2 # => 0
If a
is undefined or false, the assign b
to a
, otherwise do nothing