Как правильно сделать это в Ruby?
def callOrElse(obj, method, default) if obj.respond_to?(method) obj.__send__(method) else default end end