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-3.1.8 lib/picky/extensions/class.rb
picky-3.1.7 lib/picky/extensions/class.rb
picky-3.1.6 lib/picky/extensions/class.rb
picky-3.1.5 lib/picky/extensions/class.rb
picky-3.1.4 lib/picky/extensions/class.rb
picky-3.1.3 lib/picky/extensions/class.rb
picky-3.1.2 lib/picky/extensions/class.rb
picky-3.1.1 lib/picky/extensions/class.rb
picky-3.1.0 lib/picky/extensions/class.rb
picky-3.0.1 lib/picky/extensions/class.rb
picky-3.0.0 lib/picky/extensions/class.rb
picky-3.0.0.pre5 lib/picky/extensions/class.rb
picky-3.0.0.pre4 lib/picky/extensions/class.rb
picky-3.0.0.pre3 lib/picky/extensions/class.rb
picky-3.0.0.pre2 lib/picky/extensions/class.rb
picky-3.0.0.pre1 lib/picky/extensions/class.rb
picky-2.7.0 lib/picky/extensions/class.rb
picky-2.6.0 lib/picky/extensions/class.rb