Class: Bogus::MakesDucks

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

Instance Method Summary collapse

Methods included from Takes

takes

Instance Method Details

#make(first_class, *classes) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/bogus/fakes/makes_ducks.rb', line 7

def make(first_class, *classes)
  duck = makes_subtypes.make(first_class)
  classes.each do |klass|
    method_copiers.each do |copier|
      remove_methods(copier.call(duck), copier.call(klass))
    end
  end
  duck
end