lib/usable.rb in usable-1.2.0 vs lib/usable.rb in usable-1.2.1

- old
+ new

@@ -1,14 +1,13 @@ -require "ostruct" -require "delegate" -require "usable/version" +require 'ostruct' +require 'delegate' +require 'usable/version' +require 'usable/mod_extender' +require 'usable/config' module Usable - autoload :ModExtender, 'usable/mod_extender' - autoload :Config, 'usable/config' - def usable_config @usable_config ||= Config.new end attr_writer :usable_config @@ -40,10 +39,10 @@ # Gives the module a name when including so that it shows up properly in the list of ancestors def usable!(mod) mod_name = mod.name ? mod.name.split('::').last : "UsableMod#{Time.now.strftime('%s')}" const_name = "#{mod_name}Used" mod = mod.call if mod.respond_to? :call - remove_const const_name if const_defined? const_name + remove_const const_name if const_defined? const_name, false const_set const_name, mod usable_config.modules << mod send :include, mod end