Create a hash of options and their values
162731
def options
      {}.tap{ |options| VALID_OPTIONS_KEYS.each{|k| options[k] = send(k) } }
    end
120179
def extract_options!(array)
      if array.last.is_a?(Hash) && array.last.instance_of?(Hash)
        array.pop
      else
        {}
      end
    end
1308800
def prepare_options(options)
      options = engine.config.to_hash.merge(options)
      options.keys.each { |k| options[k.to_s.gsub(/_([a-z])/) { $1.upcase }.to_sym] = options[k] }
      options.delete_if { |k, v| v.nil? }
    end
1097040
def options
      opts = {}
      VALID_CONFIG_KEYS.each_key do |k|
        opts.merge!(k => send(k))
      end
      opts
    end
631514
def _normalize_options(options):
    """"""
    normalized_options = {}
    for key, value in iteritems(options):
        optname = str(key).lower()
        intname = INTERNAL_URI_OPTION_NAME_MAP.get(optname, key)
        normalized_options[intname] = options[key]
    return normalized_options
801734
def to_hash(options = {})
      options.reverse_merge!(@_options)

      data = root_object

      options[:root_name] = determine_object_root(data, root_name, options[:root])

      result =
        if is_object?(data) || !data # object @user
          Builder.new(data, @_settings, options).to_hash
        elsif is_collection?(data) # collection @users
          MultiBuilder.new(data, @_settings, options).to_a
        end

      result = escape_output(result) if Rabl.configuration.escape_all_output

      result
    end
979762
def format(options)
      options.map do |key, value|
        [{
          format: :f,
          size: :s,
          length: :hls_time,
        }[key] || key, value].map(&:to_s).join('=')
      end
    end
451087
def options=(options)
      fail ArgumentError, 'options must be a Hash. ' \
                          "#{ options.inspect } given." unless options.is_a?(Hash)

      @options.merge! options

      build_query
    end
251020
def token_and_options(header)
      token = header.to_s.match(/^Token (.*)/) { |m| m[1] }
      if token
        begin
          values = Hash[token.split(',').map do |value|
            value.strip!                      # remove any spaces between commas and values
            key, value = value.split(/\=\"?/) # split key=value pairs
            value.chomp!('"')                 # chomp trailing " in value
            value.gsub!(/\\\"/, '"')          # unescape remaining quotes
            [key, value]
          end]
          [values.delete("token"), values]
        rescue => error
          raise UnprocessableHeader, error
        end
      else
        [nil,{}]
      end
    end
1307663
def rearrange_options!(args, options)
      prefix_options = {}
      (PREFIX_OPTIONS + PREFIX_OPTIONS.map { |o| o.to_s }).each do |k|
        if options.has_key?(k)
          value = options.delete(k)
          prefix_options[k.to_sym] = value
        end
      end
      hash_to_options(prefix_options).reverse.each { |o| args.unshift(o) }
    end
1024231
def options
      VALID_OPTIONS_KEYS.reduce({}) do |options, key|
        options.merge(key => send(key))
      end
    end
935418
function _mergeOptions () {
  var options = {}
  for (var i = 0; i < arguments.length; ++i) {
    let obj = arguments[i]
    for (var attr in obj) { options[attr] = obj[attr] }
  }
  return options
}
16676
function() {
    var allOptions = this.dropdown.options,
        i=0, j=allOptions.length;

    // Look for multi-select selections
    if(lang.isArray(this.value)) {
        var allValues = this.value,
            m=0, n=allValues.length,
            hash = {};
        // Reset all selections and stash options in a value hash
        for(; i<j; i++) {
            allOptions[i].selected = false;
            hash[allOptions[i].value] = allOptions[i];
        }
        for(; m<n; m++) {
            if(hash[allValues[m]]) {
                hash[allValues[m]].selected = true;
            }
        }
    }
    // Only need to look for a single selection
    else {
        for(; i<j; i++) {
            if(this.value === allOptions[i].value) {
                allOptions[i].selected = true;
            }
        }
    }
}
125047
def to_hash
      Hash[options.reject(&:null?).map { |o| [o.key, o.value] }]
    end
353405
def transform_options(options)
      args = []
      options.keys.each do |opt|
        if opt.to_s.size == 1
          if options[opt] == true
            args << "-#{opt}"
          elsif options[opt] == false
            # ignore
          else
            val = options.delete(opt)
            args << "-#{opt.to_s} '#{e(val)}'"
          end
        else
          if options[opt] == true
            args << "--#{opt.to_s.gsub(/_/, '-')}"
          elsif options[opt] == false
            # ignore
          else
            val = options.delete(opt)
            args << "--#{opt.to_s.gsub(/_/, '-')}='#{e(val)}'"
          end
        end
      end
      args
    end
430938
def parse_options(options={})
      options.each do |key, value|
        key = :"#{key}="
        self.send(key, value) if !value.nil? && self.respond_to?(key)
      end
    end
1073245
def options
      VALID_OPTION_KEYS.inject({}) do |option, key|
        option.merge!(key => send(key))
      end
    end