new Class(options)
348595
function Class(name,options) {

  this.name = name || "";
  this.mixins = [];
  this.methods = {};
  this.properties = {};

  if (lib.type.isObject(options)) {
    var keys = Object.keys(options);
    var length = keys.length;
    for (var i = 0; i < length; i++) {
      var key = keys[i];
      var value = options[key];
      if (key === "constructor") {
        this.addConstructor(value);
      } else if (key === "inherits") {
        this.inherit(value);
      } else if (key === "mixins") {
        this.mixin(value);
      } else if (lib.type.isFunction(value) && lib.inherits.superOf(value,Property)) {
        this.addProperty(key,value);
      } else {
        this.addMethod(key,value);
      }
    }
  }

}
930827
function( cls ) {
				var classes = this.getCustomData( 'classes' );
				if ( !this.hasClass( cls ) ) {
					!classes && ( classes = [] ), classes.push( cls );
					this.setCustomData( 'classes', classes );
					this.addClass( cls );
				}
			}
1220004
def addClass(self, cn):
        '''
        '''
        if cn:
            if isinstance(cn, (tuple, list, set, frozenset)):
                add = self.addClass
                for c in cn:
                    add(c)
            else:
                classes = self._classes
                if classes is None:
                    self._extra['classes'] = classes = set()
                add = classes.add
                for cn in cn.split():
                    add(slugify(cn))
        return self
1215480
function(name,options) {
    var cls = new Class(name,options);
    var custom = new Class("CustomError",{
      inherits: Error,
      constructor: function(message) {
        this.name = name;
        this.message = message;
      },
    })
    cls.inherit(custom);
    return cls.toFunction();
  }
597636
def add_class(cls)
      old_cls = @classes[cls[:name]]
      if !old_cls && @alt_names[cls[:name]]
        old_cls = @alt_names[cls[:name]]
        warn_alt_name(cls)
      end

      if old_cls
        merge_classes(old_cls, cls)
        @current_class = old_cls
      else
        @current_class = cls
        @classes[cls[:name]] = cls

        # Register all alternate names of class for lookup too
        cls[:alternateClassNames].each do |altname|
          if cls[:name] == altname
            # A buggy documentation, warn.
            warn_alt_name(cls)
          else
            @alt_names[altname] = cls
            # When an alternate name has been used as a class name before,
            # then this is one crappy documentation, but attempt to handle
            # it by merging the class with alt-name into this class.
            if @classes[altname]
              merge_classes(cls, @classes[altname])
              @classes.delete(altname)
              warn_alt_name(cls)
            end
          end
        end

        insert_orphans(cls)
      end
    end
1277713
function addOptionMethod( PluginClass ) {
				// don't overwrite original option method
				if ( PluginClass.prototype.option ) {
					return;
				}

			  // option setter
			  PluginClass.prototype.option = function( opts ) {
			    // bail out if not an object
			    if ( !$.isPlainObject( opts ) ){
			      return;
			    }
			    this.options = $.extend( true, this.options, opts );
			  };
			}
599783
function(from, to) {
        var classes = ($(from).attr('class') || '').replace(this.options.filterClasses, '').trim();

        if (classes) {
            $(to).addClass(classes);
        }
    }
1035873
function (newOptions) {
        OpenLayers.Util.extend(this.options, newOptions);
        OpenLayers.Util.extend(this, newOptions);
    }
712
function (name, HandlerClass) {
		if (!HandlerClass) { return this; }

		var handler = this[name] = new HandlerClass(this);

		this._handlers.push(handler);

		if (this.options[name]) {
			handler.enable();
		}

		return this;
	}
267165
def append_class (cls)
      return unless cls

      if c = html_options["class"]
        html_options["class"] << " " + cls.to_s
      else
        if c = has_option?("class")
          c << " " + cls.to_s
          cls = c
        end

        html_options["class"] = cls.to_s
      end
    end
49684
function setClass(dom, cls, on) {
  if (on) dom.classList.add(cls)
  else dom.classList.remove(cls)
}
1101346
def add_class(self, c: 'Class') -> None:
        
        self.classes[c.name] = c
        c.parent = self
448451
function processClass (options, name, node) {
    processClassConstructor(options, name, node);
    processClassAppend(options, name, node);

    shuffleArray(options, node.children);

    for (let i = 0, max = node.children.length; i < max; i++) {
        let child = node.children[i];

        processClass(options, child, hierarchy[child]);
    }
}
1172498
function(item, ItemViewType, itemViewOptions){
    var options = _.extend({model: item}, itemViewOptions);
    return new ItemViewType(options);
  }
980822
def _make_class(cls, **kwargs):
    """"""
    kwargs = {k: (v if v is not None else getattr(cls, k, None))
              for k, v in kwargs.items()}
    # The class name contains a hash of the custom parameters.
    name = cls.__name__ + '_' + _hash(kwargs)
    if name not in _CLASSES:
        logger.log(5, "Create class %s %s.", name, kwargs)
        cls = type(name, (cls,), kwargs)
        _CLASSES[name] = cls
    return _CLASSES[name]
956755
function(options) {
    var cls = new Class(null,options);
    cls.inherit(Error);
    return cls.toFunction();
  }
548626
function classes (options) {
  options.hash.kind = 'class'
  return handlebars.helpers.each(_identifiers(options), options)
}