Add adapter to stack

 @param [Symbol/Class/Moneta store] adapter Name of adapter class, adapter class or Moneta store
 @param [Hash] options Options hash
 @api public
185895
def adapter(adapter, options = {}, &block)
      case adapter
      when Symbol
        use(Adapters.const_get(adapter), options, &block)
      when Class
        use(adapter, options, &block)
      else
        raise ArgumentError, 'Adapter must be a Moneta store' unless adapter.respond_to?(:load) && adapter.respond_to?(:store)
        raise ArgumentError, 'No options allowed' unless options.empty?
        @proxies.unshift adapter
        nil
      end
    end
648896
def add_definition(option, name, type, block, **opts)
      opts = {
        parent: extended_class,
        option: option,
        null:   null,
        source: name,
        type:   type,
        block:  block,
        **opts,
      }

      options = Dispatchers.call(opts)
      definition = Definition.new(options)
      definitions[definition.source] = definition
      finalize
      mixin.class_eval definition.code
    end
545881
def attach(options = {})
      options = Aws::Util.deep_merge(options,
        auto_scaling_group_name: @group_name,
        load_balancer_names: [@name]
      )
      resp = @client.attach_load_balancers(options)
      resp.data
    end
283403
def add_item(self, item, **options):
        
        export_item = {
            "item": item.url,
        }
        export_item.update(options)
        self.items.append(export_item)
        return self
951071
function(model, options) {
    options = options ? _.clone(options) : {};
    if (!(model = this._prepareModel(model, options))) return false;
    if (!options.wait) this.add(model, options);
    return this._callAdapter('addToIndex', options, model);
  }
418075
function Memori(options) {
  var _options = _.merge({adapter: "memory"}, options);
  var _module = path.join(__dirname, "lib", "adapters", _options.adapter);
  var _adapterImpl = require(_module);
  var _adapter = new _adapterImpl(_options);

  Object.defineProperty(this, "_adapter", {
    get: function() {
      return _adapter;
    }
  });
  Object.defineProperty(this, "adapter", {
    get: function() {
      return _adapter.name;
    }
  });
  Object.defineProperty(this, "identity", {
    get: function() {
      return _adapter.identity;
    }
  });
}
532033
def add_hook(hook, &block)
      fail ArgumentError, "Invalid hook `#{hook}'" unless\
        HOOKS.keys.include? hook
      fail ArgumentError, 'Block require' unless block_given?
      options[hook] = block
    end
1332003
def hook_into test_framework
      adapter = self.class.adapters[test_framework]
      raise ArgumentError.new "No adapter for test framework #{test_framework}" if adapter.nil?
      require adapter
    end
1037353
public function setAdapter($options = null)
    {
        if (is_string($options)) {
            $adapter = $options;
        } elseif (isset($options['adapter'])) {
            $adapter = $options['adapter'];
            unset($options['adapter']);
        } else {
            $adapter = 'BlockCipher';
        }

        if (!is_array($options)) {
            $options = [];
        }

        if (class_exists('Zend\Filter\Encrypt\\' . ucfirst($adapter))) {
            $adapter = 'Zend\Filter\Encrypt\\' . ucfirst($adapter);
        } elseif (!class_exists($adapter)) {
            throw new Exception\DomainException(
                sprintf(
                    '%s expects a valid registry class name; received "%s", which did not resolve',
                    __METHOD__,
                    $adapter
                )
            );
        }

        $this->adapter = new $adapter($options);
        if (!$this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
            throw new Exception\InvalidArgumentException(
                "Encoding adapter '" . $adapter
                . "' does not implement Zend\\Filter\\Encrypt\\EncryptionAlgorithmInterface"
            );
        }

        return $this;
    }
255863
def storage_adapter
      @storage_adapter ||= begin
        all_adapters = storage_adapters
        raise UndefinedSetting, "No storage adapters configured" if all_adapters.empty?
        adapter = all_adapters.detect do |potential_adapter|
          potential_adapter.use?(storage)
        end
        raise UndefinedSetting, "Storage is missing or not supported.  Supported: #{all_adapters.map(&:display_name).join(', ')}" unless adapter
        adapter
      end
    end
1221867
def attach(options = {})
      options = Aws::Util.deep_merge(options,
        auto_scaling_group_name: @group_name,
        instance_ids: [@id]
      )
      resp = @client.attach_instances(options)
      resp.data
    end
987998
def add_from_options(url, options)
      mirror = Mirror.new_from_options(url, options)

      add(mirror)
      mirror
    end
938656
private void push(ScopeOptions options) throws JSONException {
        m_top += 1;
        if (m_top >= MAX_DEPTH) {
            throw new JSONException("Nesting too deep.");
        }
        try {
            m_writer.write(options.m_prefix);
        }
        catch (IOException e) {
            throw new JSONException(e);
        }

        HashSetOfString keyTracker = options.createKeyTracker();
        m_scopeStack[m_top] = keyTracker;
        m_mode = (keyTracker == null) ? 'a' : 'k';
        m_expectingComma = false;
    }
674198
private function add_validator_to_stack( $validator, $key, $error_message = NULL ) {

		$options = [ ];

		if ( is_array( $validator ) && isset( $validator[ 'validator' ] ) ) {
			isset( $validator[ 'options' ] ) and $options = (array) $validator[ 'options' ];
			$validator = $validator[ 'validator' ];
		}

		$validator = $this->validator_factory->create( $validator, $options );

		isset( $this->validators[ $key ] ) or $this->validators[ $key ] = new \SplObjectStorage();
		$this->validators[ $key ]->attach( $validator, $error_message );

		return $this;

	}
1205456
def add_adapter(self, adapter):
        """"""

        if self._started:
            raise InternalError("New adapters cannot be added after start() is called")

        if isinstance(adapter, DeviceAdapter):
            self._logger.warning("Wrapping legacy device adapter %s in async wrapper", adapter)
            adapter = AsynchronousModernWrapper(adapter, loop=self._loop)

        self.adapters.append(adapter)

        adapter_callback = functools.partial(self.handle_adapter_event,
                                             len(self.adapters) - 1)
        events = ['device_seen', 'broadcast', 'report', 'connection',
                  'disconnection', 'trace', 'progress']

        adapter.register_monitor([None], events, adapter_callback)
385398
def adapters_config
      adapters = registry.adapters

      root.config :adapters do
        adapters.each do |key, adapter|
          combine(key, adapter.configuration_builder)
        end
      end
    end
1315060
def add(options = {})
      self.options = options

      raise(ArgumentError, 'Mandatory param :name missing') unless options[:name]

      if options[:feature]
        features << options
        SafetyCone::ViewHelpers.add_method(options[:feature])
      else
        paths[make_key] = options
      end
    end