Results for: "match"

No documentation available

Returns a list of paths matching glob from the latest gems that can be used by a gem to pick up features from other gems. For example:

Gem.find_latest_files('rdoc/discover').each do |path| load path end

if check_load_path is true (the default), then find_latest_files also searches $LOAD_PATH for files as well as gems.

Unlike find_files, find_latest_files will return only files from the latest version of a gem.

The file name and line number of the caller of the caller of this method.

depth is how many layers up the call stack it should go.

e.g.,

def a; Gem.location_of_caller; end a #=> [“x.rb”, 2] # (it’ll vary depending on file name and line number)

def b; c; end def c; Gem.location_of_caller(2); end b #=> [“x.rb”, 6] # (it’ll vary depending on file name and line number)

Returns the latest release-version specification for the gem name.

Returns the latest release version of RubyGems.

Returns the version of the latest release-version of gem name

The default signing key path

The default signing certificate chain path

Default options for gem commands for Ruby packagers.

The options here should be structured as an array of string “gem” command names as keys and a string of the default options as values.

Example:

def self.operating_system_defaults

{
    'install' => '--no-rdoc --no-ri --env-shebang',
    'update' => '--no-rdoc --no-ri --env-shebang'
}

end

Shortcut for defining multiple delegator methods, but with no provision for using a different name. The following two code samples have the same effect:

def_delegators :@records, :size, :<<, :map

def_delegator :@records, :size
def_delegator :@records, :<<
def_delegator :@records, :map

Define method as delegator instance method with an optional alias name ali. Method calls to ali will be delegated to accessor.method.

class MyQueue
  extend Forwardable
  attr_reader :queue
  def initialize
    @queue = []
  end

  def_delegator :@queue, :push, :mypush
end

q = MyQueue.new
q.mypush 42
q.queue    #=> [42]
q.push 23  #=> NoMethodError

Shortcut for defining multiple delegator methods, but with no provision for using a different name. The following two code samples have the same effect:

def_delegators :@records, :size, :<<, :map

def_delegator :@records, :size
def_delegator :@records, :<<
def_delegator :@records, :map

Defines a method method which delegates to accessor (i.e. it calls the method of the same name in accessor). If new_name is provided, it is used as the name for the delegate method.

No documentation available

Should be implemented by a extended class.

tsort_each_node is used to iterate for all nodes over a graph.

Sets the upper bound of the supported SSL/TLS protocol version. See min_version= for the possible values.

Adds a certificate to the context. pkey must be a corresponding private key with certificate.

Multiple certificates with different public key type can be added by repeated calls of this method, and OpenSSL will choose the most appropriate certificate during the handshake.

cert=, key=, and extra_chain_cert= are old accessor methods for setting certificate and internally call this method.

Parameters

certificate

A certificate. An instance of OpenSSL::X509::Certificate.

pkey

The private key for certificate. An instance of OpenSSL::PKey::PKey.

extra_certs

Optional. An array of OpenSSL::X509::Certificate. When sending a certificate chain, the certificates specified by this are sent following certificate, in the order in the array.

Example

rsa_cert = OpenSSL::X509::Certificate.new(...)
rsa_pkey = OpenSSL::PKey.read(...)
ca_intermediate_cert = OpenSSL::X509::Certificate.new(...)
ctx.add_certificate(rsa_cert, rsa_pkey, [ca_intermediate_cert])

ecdsa_cert = ...
ecdsa_pkey = ...
another_ca_cert = ...
ctx.add_certificate(ecdsa_cert, ecdsa_pkey, [another_ca_cert])

Note

OpenSSL before the version 1.0.2 could handle only one extra chain across all key types. Calling this method discards the chain set previously.

No documentation available
No documentation available
No documentation available

Creates a new X509::Extension with passed values. See also x509v3_config(5).

No documentation available
No documentation available
No documentation available
No documentation available
Search took: 3ms  ·  Total Results: 2165