Adds a method `name` - The method name. `where` - Where items in the `array` should be added.
344380
function (where, name) {
        var orig = [][name]
        list.prototype[name] = function () {
            // Get the items being added.
            var args = [],
                // Where we are going to add items.
                len = where ? this.length : 0,
                i = arguments.length,
                res, val, constructor = this.constructor;

            // Go through and convert anything to an `observe` that needs to be converted.
            while (i--) {
                val = arguments[i];
                args[i] = canMakeObserve(val) ? hookupBubble(val, "*", this, this.constructor.Observe, this.constructor) : val;
            }

            // Call the original method.
            res = orig.apply(this, args);

            if (!this.comparator || args.length) {

                this._triggerChange("" + len, "add", args, undefined);
            }

            return res;
        }
    }
1011159
def _add_common_methods(name, element_method, opts)
      default_method = opts.delete(:default_method)
      presence_method = opts.delete(:presence_method) || :present?

      define_method(name) do
        return default_method.call(name, self) if default_method.is_a?(Proc)

        default_method.nil? ? send(element_method) : send(element_method).send(default_method)
      end

      define_method("#{name}?") do
        return presence_method.call(name, self) if presence_method.is_a?(Proc)

        send(element_method).send(presence_method)
      end
    end
510
void addMethodInfo(final MethodInfoList methodInfoList, final Map<String, ClassInfo> classNameToClassInfo) {
        for (final MethodInfo mi : methodInfoList) {
            // Index method annotations
            addFieldOrMethodAnnotationInfo(mi.annotationInfo, /* isField = */ false, classNameToClassInfo);

            // Index method parameter annotations
            if (mi.parameterAnnotationInfo != null) {
                for (int i = 0; i < mi.parameterAnnotationInfo.length; i++) {
                    final AnnotationInfo[] paramAnnotationInfoArr = mi.parameterAnnotationInfo[i];
                    if (paramAnnotationInfoArr != null) {
                        for (int j = 0; j < paramAnnotationInfoArr.length; j++) {
                            final AnnotationInfo methodParamAnnotationInfo = paramAnnotationInfoArr[j];
                            final ClassInfo annotationClassInfo = getOrCreateClassInfo(
                                    methodParamAnnotationInfo.getName(), ANNOTATION_CLASS_MODIFIER,
                                    classNameToClassInfo);
                            annotationClassInfo.addRelatedClass(RelType.CLASSES_WITH_METHOD_PARAMETER_ANNOTATION,
                                    this);
                            this.addRelatedClass(RelType.METHOD_PARAMETER_ANNOTATIONS, annotationClassInfo);
                        }
                    }
                }
            }
        }
        if (this.methodInfo == null) {
            this.methodInfo = methodInfoList;
        } else {
            this.methodInfo.addAll(methodInfoList);
        }
    }
87784
private function addMethod($method)
    {
        $tokens = $this->methodParser->parse($method);
        $query = $this->queryBuilder->build($tokens, $this->tableName, $this->namingContention, $this->entityClass);
        if ($query->getResultMode() <= QueryBuilderResult::RESULT_SELECT_MULTIPLE) {
            $this->addSelectionMethod($query, $method);
        } else {
            $this->addIntResultMethod($query, $method);
        }

    }
1032323
def add(o)
      case o
      when nil
        raise Error, "Cannot add '#{o.class}' to window!"
      when Array
        o.each { |x| add_object(x) }
      else
        add_object(o)
      end
    end
66368
function( name ) {
		var self = this;

		self._addResult( name );
		self.passed++;
		self.count++;
		munit.passed++;
	}
733671
function(where, name) {
                var orig = [][name];
                list.prototype[name] = function() {
                    // Get the items being added.
                    var args = [],
                        // Where we are going to add items.
                        len = where ? this.length : 0,
                        i = arguments.length,
                        res, val;

                    // Go through and convert anything to an `map` that needs to be converted.
                    while (i--) {
                        val = arguments[i];
                        args[i] = bubble.set(this, i, this.__type(val, i));
                    }

                    // Call the original method.
                    res = orig.apply(this, args);

                    if (!this.comparator || args.length) {

                        this._triggerChange("" + len, "add", args, undefined);
                    }

                    return res;
                };
            }
169390
def method_missing(method_name, *arguments)
      klass = REGISTRY.fetch(method_name) { super }

      Evaluator.new(klass, arguments).rules.each do |rule|
        add(rule)
      end

      self
    end
1164993
def add_row(self, array):
        

        self._check_row_size(array)
        self._rows.append(map(str, array))
1269020
public function addMethod($name, $method) 
	{
		$this->methods[$name] = array(
			'name' => $name,
			'call' => $method
		);
		xmlrpc_server_register_method( $this->xmlrpc, $name, array( $this, 'call' ) );
	}
50281
def add(self, rule, method, target, name=None, static=False):
        '''  '''
        if static:
            depr("Use a backslash to escape ':' in routes.") # 0.9
            rule = rule.replace(':','\\:')

        if rule in self.routes:
            self.routes[rule][method.upper()] = target
        else:
            self.routes[rule] = {method.upper(): target}
            self.rules.append(rule)
            if self.static or self.dynamic: # Clear precompiler cache.
                self.static, self.dynamic = {}, {}
        if name:
            self.named[name] = (rule, None)
948288
public function addWhere(array $where): void
    {
        if (empty($where)) {
            return;
        }

        $firstClause = true;
        $this->statement .= ' WHERE ';
        foreach ($where as $clause) {
            if ($firstClause === false) {
                $this->statement .= ' ' . $clause['concatenator'] . ' ';
            }
            switch ($clause['operator']) {
                case 'IN':
                    $this->addWhereIn($clause['key'], $clause['value'], false);
                    break;
                case 'NOT IN':
                    $this->addWhereIn($clause['key'], $clause['value'], true);
                    break;
                case 'BETWEEN':
                    $this->addWhereBetween($clause['key'], $clause['value']['min'], $clause['value']['max']);
                    break;
                case 'NULL':
                    $this->addWhereNull($clause['key'], false);
                    break;
                case 'NOT NULL':
                    $this->addWhereNull($clause['key'], true);
                    break;
                default:
                    $this->addSimpleWhere($clause['key'], $clause['operator'], $clause['value']);
                    break;
            }

            $firstClause = false;
        }
    }
335426
def addMethod(self, m):
        
        if m.nargs == -1:
            m.nargs = len([a for a in marshal.genCompleteTypes(m.sigIn)])
            m.nret = len([a for a in marshal.genCompleteTypes(m.sigOut)])
        self.methods[m.name] = m
        self._xml = None
1002592
function addHookByType(ctx, type, methodNames, fn) {
  let i = methodNames.length;

  // If no hook specified, add wildcard
  if (i === 0) {
    methodNames = ['*'];
    i = 1;
  }

  let hookType = `${type}Hooks`;

  if (!ctx[hookType]) ctx[hookType] = {};

  while (i--) {
    let methodName = methodNames[i];
    // for array method names
    if (Array.isArray(methodName)) {
      addHookByType(ctx, type, methodName, fn);
    } else {
      if (!ctx[hookType][methodName]) {
        ctx[hookType][methodName] = [fn];
      } else {
        ctx[hookType][methodName].push(fn);
      }
    }
  }
}
1227742
public function addItems(array $items, $where = '')
    {
        foreach (array_keys($items) as $k) {
            if (!is_int($k) && $this->hasItem($k)) {
                unset($items[$k]);
            }
        }
        if (!empty($items)) {
            $this->setItems($items, $where);
        }

        return $this;
    }
936515
protected function addMethod($name, $parameters)
    {
        $methods = $this->methods();

        $parameters = is_array($parameters) ? $parameters : [$parameters];

        $methods[] = compact('name', 'parameters');

        $this->methods($methods);
    }
929984
def merge_wheres(self, wheres, bindings):
        
        self.wheres = self.wheres + wheres
        self._bindings['where'] = self._bindings['where'] + bindings