It is called the Safe Navigation Operator. Introduced in Ruby 2.3.0, it lets you call methods on objects without worrying that the object may be nil(Avoiding an undefined method for nil:NilClass error), similar to the try method in Rails.
So you can write
@person&.spouse&.name
instead of
@person.spouse.name if @person && @person.spouse
From the Docs:
my_object.my_methodThis sends the
my_methodmessage tomy_object. Any
object can be a receiver but depending on the method’s visibility
sending a message may raise aNoMethodError.You may use
&.to designate a receiver, thenmy_methodis not invoked
and the result isnilwhen the receiver isnil. In that case, the
arguments ofmy_methodare not evaluated.