tryメソッドの使い方 2019-11-29 ruby 使い方 Object.try(method) 例 どちらも同じ意味。 @person.try(:name) @person.name if @person