class Proc
Public Class Methods
try_convert(obj)
click to toggle source
Try to convert obj into a Proc
, using to_proc method. Returns converted proc or nil if obj cannot be converted for any reason.
# File lib/try_convert.rb, line 43 def Proc.try_convert obj obj.to_proc rescue nil end