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.4.1 lib/picky/extensions/class.rb
picky-4.4.0 lib/picky/extensions/class.rb
picky-4.3.2 lib/picky/extensions/class.rb
picky-4.3.1 lib/picky/extensions/class.rb
picky-4.3.0 lib/picky/extensions/class.rb
picky-4.2.4 lib/picky/extensions/class.rb
picky-4.2.3 lib/picky/extensions/class.rb
picky-4.2.2 lib/picky/extensions/class.rb
picky-4.2.1 lib/picky/extensions/class.rb
picky-4.2.0 lib/picky/extensions/class.rb
picky-4.1.0 lib/picky/extensions/class.rb
picky-4.0.9 lib/picky/extensions/class.rb
picky-4.0.8 lib/picky/extensions/class.rb
picky-4.0.7 lib/picky/extensions/class.rb
picky-4.0.6 lib/picky/extensions/class.rb
picky-4.0.5 lib/picky/extensions/class.rb
picky-4.0.4 lib/picky/extensions/class.rb
picky-4.0.3 lib/picky/extensions/class.rb
picky-4.0.1 lib/picky/extensions/class.rb
picky-4.0.0 lib/picky/extensions/class.rb