module DissociatedIntrospection::Try::Core
Public Instance Methods
try(*a) { |self| ... }
click to toggle source
# File lib/dissociated_introspection/try.rb, line 6 def try(*a, &b) if a.empty? || respond_to?(a.first) if a.empty? && block_given? if b.arity.zero? instance_eval(&b) else yield self end else public_send(*a, &b) end end end