Sha256: 2935fb2119bac82c4ce395b80ca3a4a33f81ab9b4eea481142ee190b7d4a3dba
Contents?: true
Size: 693 Bytes
Versions: 142
Compression:
Stored size: 693 Bytes
Contents
# frozen_string_literal: true class DumbDelegator < ::BasicObject # Handle public_send correctly when ActionView calls this method # Reference: https://github.com/stevenharman/dumb_delegator/issues/9 # def public_send(method, *args, &block) if respond_to?(method) __send__(method, *args, &block) else __getobj__.public_send(method, *args, &block) end end def try(*_a, &_b) raise "Cannot call #try on a BasicObject" end def try!(*_a, &_b) raise "Cannot call #try! on a BasicObject" end def send(method_name, *args, &block) __send__(method_name, *args, &block) end def inspect "DumbDelegator(#{__getobj__.inspect})" end end
Version data entries
142 entries across 142 versions & 1 rubygems