Sha256: 0e8013fc3b3ce62198e09f75c2f0cca4f996eac596534832aff47462d42f9582

Contents?: true

Size: 234 Bytes

Versions: 8

Compression:

Stored size: 234 Bytes

Contents

module Bogus
  class MakesSubtypes
    extend Takes

    takes :copies_methods

    def make(klass)
      subtype = klass.is_a?(Class) ? Class.new : Module.new
      copies_methods.copy(klass, subtype)
      subtype
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bogus-0.1.7 lib/bogus/fakes/makes_subtypes.rb
bogus-0.1.6 lib/bogus/fakes/makes_subtypes.rb
bogus-0.1.5 lib/bogus/fakes/makes_subtypes.rb
bogus-0.1.4 lib/bogus/fakes/makes_subtypes.rb
bogus-0.1.3 lib/bogus/makes_subtypes.rb
bogus-0.1.2 lib/bogus/makes_subtypes.rb
bogus-0.1.1 lib/bogus/makes_subtypes.rb
bogus-0.1.0 lib/bogus/makes_subtypes.rb