Sha256: d344abdc1346c2c9ca40d8dfca1766b6bc057f03d0fc0d99ec3c96b59df30afe

Contents?: true

Size: 317 Bytes

Versions: 2

Compression:

Stored size: 317 Bytes

Contents

module Bogus
  class CopiesClasses
    extend Takes

    takes :copies_methods

    def copy(klass)
      copy_class = Class.new(Bogus::Fake) do
        define_singleton_method(:__copied_class__) do
          klass
        end
      end
      copies_methods.copy(klass, copy_class)
      copy_class
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bogus-0.1.2 lib/bogus/copies_classes.rb
bogus-0.1.1 lib/bogus/copies_classes.rb