module Gemmy::Patches::ObjectPatch::InstanceMethods::Try
Public Instance Methods
try(method=nil, *args, &block)
click to toggle source
facets nicer than the builtin @example.try.name #=> “bob” @people.try(:collect){ |p| p.name }
# File lib/gemmy/patches/object_patch.rb, line 72 def try(method=nil, *args, &block) if method __send__(method, *args, &block) else self end end