lib/bogus/copies_classes.rb in bogus-0.1.2 vs lib/bogus/copies_classes.rb in bogus-0.1.3
- old
+ new
@@ -7,10 +7,15 @@
def copy(klass)
copy_class = Class.new(Bogus::Fake) do
define_singleton_method(:__copied_class__) do
klass
end
+
+ define_singleton_method(:const_missing) do |name|
+ klass.const_get(name)
+ end
end
+
copies_methods.copy(klass, copy_class)
copy_class
end
end
end