lib/wardrobe/class_methods.rb
# This is called when included in another module/class
This is called when included in another module/class
This is called when included in another module / class
def included(base)
      instance_methods_module.freeze
      if base.class == Module && base.respond_to?(:class_methods_module)
        ddd = class_methods_module
        base.class_methods_module do
          include(ddd)
        end
      end
      class_methods_module.freeze
      unless base.respond_to? :wardrobe_config
        base.include(Wardrobe)
      end
      (plugin_store.store.keys - Wardrobe.config.default_plugins.to_a).each do |plugin|
        base.plugin(plugin) unless base.plugin_store[plugin]
      end
      base.merge_wardrobe_config(wardrobe_config)
      base.instance_methods_module.freeze
      base.class_methods_module.freeze
    end
def included ( base ) instance_methods_module . freeze if base . class == Module && base . respond_to? ( :class_methods_module ) ddd = class_methods_module base . class_methods_module do include ( ddd ) end end class_methods_module . freeze unless base . respond_to? :wardrobe_config base . include ( Wardrobe ) end ( plugin_store . store . keys - Wardrobe . config . default_plugins . to_a ) . each do | plugin | base . plugin ( plugin ) unless base . plugin_store [ plugin ] end base . merge_wardrobe_config ( wardrobe_config ) base . instance_methods_module . freeze base . class_methods_module . freeze end
This is called when included in another module/class
This is called when included in another module / class
base
<not_specific>