Sha256: 4c8bc4ce2784a92241d8694e8cf9d64da1154df0f5c77235e35e2078f3d255be
Contents?: true
Size: 259 Bytes
Versions: 16
Compression:
Stored size: 259 Bytes
Contents
module Kernel # Like #respond_to? but returns the result of the call if # it does respond. # # (This is used to be called #respond_with_value.) def respond(sym, *args) return nil if not respond_to?(sym, *args) send(sym, *args) end end
Version data entries
16 entries across 16 versions & 1 rubygems