Class: Bogus::MakesSubtypes

Inherits:
Object
  • Object
show all
Extended by:
Takes
Defined in:
lib/bogus/fakes/makes_subtypes.rb

Instance Method Summary collapse

Methods included from Takes

takes

Instance Method Details

#make(klass) ⇒ Object



7
8
9
10
11
# File 'lib/bogus/fakes/makes_subtypes.rb', line 7

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