Object#try accepts blocks
Object#try accepts blocks:
album.try { |a| a.name }
As it can be seen in the docs, if you pass a block without arguments, it will be instance_evaled:
album.try { credits.first.name }
Object#try accepts blocks:
album.try { |a| a.name }
As it can be seen in the docs, if you pass a block without arguments, it will be instance_evaled:
album.try { credits.first.name }