Sha256: 7ddcaae7182cb1e82f225fb441ad1fb01e586300befb63802a2e3bad87e0fb75
Contents?: true
Size: 470 Bytes
Versions: 4
Compression:
Stored size: 470 Bytes
Contents
module RR class DoubleMethodProxy def initialize(space, creator, object, &block) #:nodoc: @space = space @creator = creator @object = object class << self instance_methods.each do |m| undef_method m unless m =~ /^__/ end def method_missing(method_name, *args, &block) @creator.create!(@object, method_name, *args, &block) end end yield(self) if block_given? end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rr-0.4.0 | lib/rr/double_method_proxy.rb |
rr-0.4.2 | lib/rr/double_method_proxy.rb |
rr-0.4.3 | lib/rr/double_method_proxy.rb |
rr-0.4.1 | lib/rr/double_method_proxy.rb |