class Vault::Request

Attributes

client[R]

Public Class Methods

new(client) click to toggle source
# File lib/vault/request.rb, line 5
def initialize(client)
  @client = client
end

Public Instance Methods

inspect() click to toggle source

@return [String]

# File lib/vault/request.rb, line 15
def inspect
  "#<#{self.class.name}:0x#{"%x" % (self.object_id << 1)}>"
end
to_s() click to toggle source

@return [String]

# File lib/vault/request.rb, line 10
def to_s
  "#<#{self.class.name}>"
end

Private Instance Methods

extract_headers!(options = {}) click to toggle source

Removes the given header fields from options and returns the result. This modifies the given options in place.

@param [Hash] options

@return [Hash]

# File lib/vault/request.rb, line 29
def extract_headers!(options = {})
  extract = {
    wrap_ttl: Vault::Client::WRAP_TTL_HEADER,
    namespace: Vault::Client::NAMESPACE_HEADER,
  }

  {}.tap do |h|
    extract.each do |k,v|
      if options[k]
        h[v] = options.delete(k)
      end
    end
  end
end