Instance methods.
330046
def instance_action_module
      @instance_action_module ||= Module.new do

        # Returns the <tt>Savon::Client</tt> from the class instance.
        def client(&block)
          self.class.client(&block)
        end

        private

        def merged_default_body(body = {})
          default = self.respond_to?(:default_body) ? self.default_body : nil
          (default || {}).merge (body || {})
        end

      end.tap { |mod| include(mod) }
    end
1256196
public void setInstances(java.util.Collection<HttpInstanceSummary> instances) {
        if (instances == null) {
            this.instances = null;
            return;
        }

        this.instances = new java.util.ArrayList<HttpInstanceSummary>(instances);
    }
629349
def instance_for_arguments(self, arguments):
        
        result = ModelInstance()
        for key, value in self.__dict__.items():
            if isinstance(value, AbstractPriorModel):
                value = value.instance_for_arguments(arguments)
            setattr(result, key, value)
        return result
647317
final public static function instance()
        {
            $className = get_called_class();

            if (!Arrays::exists(static::$instances[$className])) {
                static::$instances[$className] = new $className(func_get_args());
            }

            return static::$instances[$className];
        }
819697
def instance_dir(obj):  # pragma: py3 no cover
    """"""
    d = dict()
    d.update(obj.__dict__)
    d.update(class_dir(obj.__class__))
    result = sorted(d.keys())
    return result
899511
static public function dumpInstances()
    {
        foreach (static::$instances as $k => $v) {
            echo $k . ':' . get_class($v) . ':'; print_r($v->getOption()); PHP_EOL;
        }
    }
627117
def _instance(self, cls, *args, **kwargs):
        
        logger.debug(f'args: {args}, kwargs: {kwargs}')
        return cls(*args, **kwargs)
475107
function listInstanceMethods (Model) {
  var classMethods = Object.keys(Model.schema.methods);
  for (var method in ModelPrototype) {
    if (!isPrivateMethod(method) && isFunction(ModelPrototype[method])) {
      classMethods.push(method);
    }
  }
  return classMethods;
}
645685
def _init_methods(self):
        
        for name_group in self._METHOD_GROUPS:
            functions = getattr(self, name_group, ())
            uniques = {}
            for func in functions:
                name_func = func.__name__
                method = types.MethodType(func, self)
                setattr(self, name_func, method)
                shortname = '_'.join(name_func.split('_')[:-1])
                if shortname in uniques:
                    uniques[shortname] = None
                else:
                    uniques[shortname] = method
            for (shortname, method) in uniques.items():
                if method is not None:
                    setattr(self, shortname, method)
471345
def instances(klass)
      files.map do |plugin_file|
        plugin_file.instances.select { |inst| inst.is_a?(klass) }
      end.flatten
    end
567702
def to_instances(records)
      records.each_with_object({}) do |attributes, memo|
        record = @klass.new(attributes)
        memo[record[@klass.masterman.primary_key]] = record
      end
    end
421261
def create(cls):
        
        if cls not in cls._instances:
            cls._instances[cls] = cls()

        return cls._instances[cls]
346472
def instance(self_or_cls,**params):
        

        if isinstance (self_or_cls,ParameterizedMetaclass):
            cls = self_or_cls
        else:
            p = params
            params = dict(self_or_cls.get_param_values())
            params.update(p)
            params.pop('name')
            cls = self_or_cls.__class__

        inst=Parameterized.__new__(cls)
        Parameterized.__init__(inst,**params)
        if 'name' in params:  inst.__name__ = params['name']
        else:                 inst.__name__ = self_or_cls.name
        return inst
946021
def __instances(self):
        
        for instance in self.__instances_cache:
            yield instance
        for instance in self.__instances_original:
            self.__instances_cache.append(instance)
            yield instance
1298982
def context_methods
      @context.instance_methods.inject({}) do |methods, name|
        methods.merge(name.to_sym => @context.instance_method(name))
      end
    end
270720
function () {
	          var _this = this;
	          var args = [];
	          for (var _i = 0; _i < arguments.length; _i++) {
	              args[_i - 0] = arguments[_i];
	          }
	          var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);
	          _classStmt.fields.forEach(function (field) { _this[field.name] = undefined; });
	          _executeFunctionStatements(ctorParamNames, args, _classStmt.constructorMethod.body, instanceCtx, _visitor);
	      }
91807
function instanceMethod(method) {
		return function (req, res, next) {

			var done = function (err, data) {
				if (err) {
					return res.status(400).send(err);
				}
				return res.send(data);
			};

			var id = req.params.id;
			if (id) {
				Model.findById(id, function (err, data) {
					if (err) {
						debug('Method middleware Model.findById error:', err);
						return next(err);
					}
					if (data) {
						data[method](req, res, done, next);
					} else {
						return res.status(404).send();
					}
				});
			} else {
				return res.status(404).send();
			}
		};
	}