lib/bogus/copies_classes.rb in bogus-0.0.2 vs lib/bogus/copies_classes.rb in bogus-0.0.3.rc.1

- old
+ new

@@ -1,10 +1,10 @@ module Bogus class CopiesClasses extend Takes - takes :method_stringifier + takes :makes_substitute_methods def copy(klass) copy_class = Class.new(Bogus::Fake) copy_class.__copied_class__ = klass @@ -31,14 +31,10 @@ copy_class.instance_eval(method_as_string(klass.method(name))) end end def method_as_string(method) - args = @method_stringifier.arguments_as_string(method.parameters) - args_no_defaults = args.gsub(' = {}', '') - - @method_stringifier.stringify(method, - "__record__(:#{method.name}, #{args_no_defaults})") + makes_substitute_methods.stringify(method) end end end