def extensions!(*extension_syms)
      return extension_syms if extension_syms.length == 0

      extension_syms = extension_syms.flatten.collect {|es| es.to_sym}.compact

      if extension_syms.include?(:all)
        ordered_extension_syms = self.extension_include_order.dup
      else
        extensions_without_defined_order = extension_syms.uniq - self.extension_include_order.uniq
        if extensions_without_defined_order.length > 0
          raise ::Irie::ConfigurationError.new "The following must be added to the self.extension_include_order array in Irie configuration: #{extensions_without_defined_order.collect(&:inspect).join(', ')}"
        else
          ordered_extension_syms = self.extension_include_order & extension_syms
        end
      end

      # load requested extensions
      ordered_extension_syms.each do |arg_sym|
        if module_class_name = self.available_extensions[arg_sym]
          begin
            ::Irie.logger.debug("[Irie] Irie::ClassMethods.extensions! #{self} including #{module_class_name}") if ::Irie.debug?
            include module_class_name.constantize
          rescue NameError => e
            raise ::Irie::ConfigurationError.new "Failed to constantize '#{module_class_name}' with extension key #{arg_sym.inspect} in self.available_extensions. Error: \n#{e.message}\n#{e.backtrace.join("\n")}"
          end      
        else
          raise ::Irie::ConfigurationError.new "#{arg_sym.inspect} isn't defined in self.available_extensions"
        end
      end

      extension_syms
    end
def extensions!(*extension_syms)
      return extension_syms if extension_syms.length == 0

      extension_syms = extension_syms.flatten.collect {|es| es.to_sym}.compact

      if extension_syms.include?(:all)
        ordered_extension_syms = self.extension_include_order.dup
      else
        extensions_without_defined_order = extension_syms.uniq - self.extension_include_order.uniq
        if extensions_without_defined_order.length > 0
          raise ::Irie::ConfigurationError.new "The following must be added to the self.extension_include_order array in Irie configuration: #{extensions_without_defined_order.collect(&:inspect).join(', ')}"
        else
          ordered_extension_syms = self.extension_include_order & extension_syms
        end
      end

      # load requested extensions
      ordered_extension_syms.each do |arg_sym|
        if module_class_name = self.available_extensions[arg_sym]
          begin
            ::Irie.logger.debug("[Irie] Irie::ClassMethods.extensions! #{self} including #{module_class_name}") if ::Irie.debug?
            include module_class_name.constantize
          rescue NameError => e
            raise ::Irie::ConfigurationError.new "Failed to constantize '#{module_class_name}' with extension key #{arg_sym.inspect} in self.available_extensions. Error: \n#{e.message}\n#{e.backtrace.join("\n")}"
          end      
        else
          raise ::Irie::ConfigurationError.new "#{arg_sym.inspect} isn't defined in self.available_extensions"
        end
      end

      extension_syms
    end
Load specified extensions in the order defined by self.extension_include_order.