Sha256: 4be7a8efd7e79f12d778ab05f9e1d9c27676be34ed9bbadea835751b151ba30c

Contents?: true

Size: 279 Bytes

Versions: 78

Compression:

Stored size: 279 Bytes

Contents

# The original Class class.
#
class Class # :nodoc:all

  def instance_delegate *methods
    methods.each do |method|
      module_eval("def self.#{method}(*args, &block)\nself.instance.__send__(#{method.inspect}, *args, &block)\nend\n", "(__DELEGATION__)", 1)
    end
  end

end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
picky-4.0.0pre6 lib/picky/extensions/class.rb
picky-4.0.0pre5 lib/picky/extensions/class.rb
picky-4.0.0pre3 lib/picky/extensions/class.rb
picky-4.0.0pre2 lib/picky/extensions/class.rb
picky-4.0.0pre1 lib/picky/extensions/class.rb
picky-3.6.16 lib/picky/extensions/class.rb
picky-3.6.15 lib/picky/extensions/class.rb
picky-3.6.14 lib/picky/extensions/class.rb
picky-3.6.13 lib/picky/extensions/class.rb
picky-3.6.12 lib/picky/extensions/class.rb
picky-3.6.11 lib/picky/extensions/class.rb
picky-3.6.10 lib/picky/extensions/class.rb
picky-3.6.9 lib/picky/extensions/class.rb
picky-3.6.8 lib/picky/extensions/class.rb
picky-3.6.7 lib/picky/extensions/class.rb
picky-3.6.6 lib/picky/extensions/class.rb
picky-3.6.4 lib/picky/extensions/class.rb
picky-3.6.3 lib/picky/extensions/class.rb
picky-3.6.2 lib/picky/extensions/class.rb
picky-3.6.1 lib/picky/extensions/class.rb