Sha256: d8ade23fe0897e8a88fa38c8671fbe49a65b6fd720d27603b9faaad465530b0e
Contents?: true
Size: 662 Bytes
Versions: 35
Compression:
Stored size: 662 Bytes
Contents
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
35 entries across 35 versions & 1 rubygems