module Bluesky::TryHelper

Protected Instance Methods

try(target, *a, &b) click to toggle source
# File lib/bluesky/helpers.rb, line 56
def try(target, *a, &b)
  return nil if target.respond_to?(:nil?) && target.nil?
  return target.public_send(*a, &b) if target.respond_to?(:public_send)
  return nil
end