Sha256: 7f28d6e86fa574a9f8ede85af34c492034754329eeba7d24aa99f43efa1e0441
Contents?: true
Size: 563 Bytes
Versions: 2
Compression:
Stored size: 563 Bytes
Contents
class Bogus::ProxyClass def initialize(fake_name, klass, create_recording_proxy) @fake_name = fake_name @klass = klass @create_recording_proxy = create_recording_proxy @recording_proxy = @create_recording_proxy.call(@klass, @fake_name) end def new(*args, &block) instance = @klass.new(*args, &block) @create_recording_proxy.call(instance, @fake_name) end def method_missing(name, *args, &block) @recording_proxy.__send__(name, *args, &block) end def respond_to?(name) @recording_proxy.respond_to?(name) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bogus-0.0.2 | lib/bogus/proxy_class.rb |
bogus-0.0.1 | lib/bogus/proxy_class.rb |