Sha256: 98b0e143c2a2c001adb85c042fff2c3c9fe3b2efe5237a0d41ed8bcfe9644540
Contents?: true
Size: 788 Bytes
Versions: 1
Compression:
Stored size: 788 Bytes
Contents
= Proxies Proxies can even proxy other proxies. The gem is Ruby 1.8 and 1.9 compatible (on 1.9 uses BasicObject class). == Installation gem install proxies == Usage Proxies::Proxy.new(lambda { my_method }, :owner => self) do def extension_method proxy_target.length * 500 end end Proxies::Proxy.new(lambda { my_method }, :owner => self, :extend => MyExtension) do def add_owner_and_target_values proxy_target.value + proxy_owner.value end end Proxies::Proxy.new(lambda { target_object }) do def extension_method proxy_target.length * 500 end end Proxies::Proxy.new(lambda { my_method }, :owner => self, :extend => [FirstExtension, SecondExtension]) == Copyright Copyright (c) 2010 Jakub Kuźma. See LICENSE for details.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
proxies-0.2.1 | README.rdoc |