Returns the last key as a symbol. Used in Options.to_hash.
970965
def key
      key = config[:key] || flags.last.sub(/\A--?/, '')
      key = key.tr '-', '_' if underscore_flags?
      key.to_sym
    end
92928
def last(from: nil, to: nil, &block)
      retval = nil

      each_with_depth(from: from, to: nil) do |line, depth, index|
        retval = line if block.call(line, depth, index)
      end

      retval
    end
557032
def to_hash
      h = super
      h['timed_stats'] = @timed_stats.to_hash
      h['value_stats'] = @value_stats.to_hash( Stats::STATS - %w[ rate ] )
      h['rate'] = self.rate
      h['unit_count'] = self.unit_count
      return h
    end
634770
def __prefix_key(self, key):
        
        # If there isn't a prefix don't bother
        if self.prefix is None:
            return key

        # Don't prefix key if it already has it
        if key.startswith(self.prefix + "-"):
            return key

        return "{0}-{1}".format(self.prefix, key)
332162
def last_restapi_key_transformer(key, attr_desc, value):
    
    key, value = full_restapi_key_transformer(key, attr_desc, value)
    return (key[-1], value)
847220
def symbolize_keys(hash)
      hash = hash.to_hash
      if hash.respond_to?(:symbolize_keys)
        hash.symbolize_keys
      else
        hash.inject({}) do |new_hash, (key, value)|
          new_hash[symbolize_key(key)] = value
          new_hash
        end
      end
    end
1145949
def last(self, db=_DefaultDB):
        '''
        
        '''
        self._acqXactForReading()
        try:
            with self.xact.cursor(db=db.db) as curs:
                if not curs.last():
                    return None
                return curs.key(), curs.value()
        finally:
            self._relXactForReading()
93391
def to_hash
        h = {}
        keys.each { |k| h[ k ] = self.fetch( k ) }
        h
    end
53059
def GetLastKey(self, voice=1):
        """"""

        voice_obj = self.GetChild(voice)
        if voice_obj is not None:
            key = BackwardSearch(KeyNode, voice_obj, 1)
            if key is not None:
                return key
            else:
                if hasattr(self, "key"):
                    return self.key
        else:
            if hasattr(self, "key"):
                return self.key
721466
def buffer_key(key, opts)
      # covert keys to strings, as sorting a Hash with Symbol keys fails on
      # Ruby 1.8.x.
      opts = opts.inject({}) do |result, (k, v)|
        result[k.to_s] = v
        result
      end
      "#{key.to_s}:#{opts.sort.flatten.join(':')}"
    end
1034869
def symbolize_keys(hash)
      hash.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
    end
54452
def symbolize_keys(attributes)
        return attributes.reduce({}) do |attribute, (key, value)|
          attribute.tap { |a| a[key.to_sym] = symbolize_keys(value) }
        end if attributes.is_a? Hash

        return attributes.reduce([]) do |attribute, value|
          attribute << symbolize_keys(value); attribute
        end if attributes.is_a? Array

        attributes
      end
1342882
def deep_set_symbol_key(hash, key, value)
      if value.kind_of? Hash
        hash[key.to_sym] = value.inject({}) { |inner_hash, (inner_key, inner_value)| deep_set_symbol_key(inner_hash, inner_key, inner_value) }
      else
        hash[key.to_sym] = value
      end
      hash
    end
1312308
def get_last_depth(self, symbol, _type):
        
        params = {'symbol': symbol, 'type': _type}

        url = u.MARKET_URL + '/market/depth'

        def _wrapper(_func):
            @wraps(_func)
            def handle():
                _func(http_get_request(url, params))

            return handle

        return _wrapper
516838
def symbolise(data)
      return {} unless data
      # Symbolize keys.
      Hash[data.map { |k, v| [k.to_sym, v] }]
    end
167719
def symbolize_keys(hash)
      hash.keys.each do |key|
        hash[(key.to_sym rescue key) || key] = hash.delete(key)
      end
      hash
    end
706466
def last(self):
        """"""
        with self.lock:
            try:
                return self.data[-1][0]
            except IndexError as ex:
                ex.args = ('DEPQ is empty',)
                raise