lib/usable/mod_extender.rb in usable-1.4.0 vs lib/usable/mod_extender.rb in usable-2.0.0

- old
+ new

@@ -28,26 +28,26 @@ unwanted.each do |method_name| copy.send :remove_method, method_name end end - # @description Directly include a module whose methods you want made available in +usable_config.available_methods+ + # @description Directly include a module whose methods you want made available in +usables.available_methods+ # Gives the module a name when including so that it shows up properly in the list of ancestors def use!(target) override if copy.name.nil? const_name = "#{mod_name}Used" target.send :remove_const, const_name if target.const_defined? const_name, false target.const_set const_name, copy end - target.usable_config.modules << copy + target.usables.add_module copy target.send options[:method], copy end # @description Includes or prepends the original module onto the target def use_original!(target) return unless has_spec? - target.usable_config.modules << mod + target.usables.add_module mod target.send options[:method], mod end # @description Extends the target with the module's ClassMethod mod def use_class_methods!(target)