lib/mack-facets/extensions/object.rb in mack-facets-0.7.1.1 vs lib/mack-facets/extensions/object.rb in mack-facets-0.8.0

- old
+ new

@@ -1,6 +1,13 @@ class Object + def define_instance_method(sym, &block) + mod = Module.new do + define_method(sym, &block) + end + self.extend mod + end + # Includes a module into the current Class, and changes all the module's public methods to protected. # # Example: # class FooController # safely_include_module(MyCoolUtils, MyOtherModule) \ No newline at end of file