Iterates through the children, yielding for each Element
that has a particular text set.
the text to search for. If nil, or not supplied, will iterate over all Element
children that contain at least one Text
node.
(optional) causes this method to return after yielding for this number of matching children
(optional) if supplied, this is an XPath
that filters the children to check.
doc = Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>' # Yields b, c, d doc.each_element_with_text {|e|p e} # Yields b, c doc.each_element_with_text('b'){|e|p e} # Yields b doc.each_element_with_text('b', 1){|e|p e} # Yields d doc.each_element_with_text(nil, 0, 'd'){|e|p e}
Get a single optional argument from the command line. If more than one argument is given, return only the first. Return nil if none are given.
Returns true and prepares http response, if rdoc for the requested gem name pattern was found.
The search is based on the file system content, not on the gems metadata. This allows additional documentation folders like ‘core’ for the Ruby core documentation - just put it underneath the main doc folder.
Enumerates the outdated local gems yielding the local specification and the latest remote version.
This method may take some time to return as it must check each local gem against the server’s index.
Is there a path from ‘self` to `other` following edges in the dependency graph? @return true iff there is a path following edges within this {#graph}
Checks if there are duplicate links with the same type and hreflang attributes that have an alternate (or empty) rel attribute
Raises a TooMuchTagError
if there are duplicates found
Encrypts data in a streaming fashion. Hand consecutive blocks of data to the update
method in order to encrypt it. Returns the encrypted data chunk. When done, the output of Cipher#final
should be additionally added to the result.
data
is a nonempty string. buffer
is an optional string to store the result.
Returns the remaining data held in the cipher object. Further calls to Cipher#update
or Cipher#final
will return garbage. This call should always be made as the last call of an encryption or decryption operation, after after having fed the entire plaintext or ciphertext to the Cipher
instance.
If an authenticated cipher was used, a CipherError
is raised if the tag could not be authenticated successfully. Only call this method after setting the authentication tag and passing the entire contents of the ciphertext into the cipher.
Enables or disables padding. By default encryption operations are padded using standard block padding and the padding is checked and removed when decrypting. If the pad parameter is zero then no padding is performed, the total amount of data encrypted or decrypted must then be a multiple of the block size or an error will occur.
See EVP_CIPHER_CTX_set_padding for further information.
Parses a given string
as a blob that contains configuration for openssl.
If the source of the IO
is a file, then consider using parse_config.
Not every message digest can be computed in one single pass. If a message digest is to be computed from several subsequent sources, then each may be passed individually to the Digest
instance.
digest = OpenSSL::Digest::SHA256.new digest.update('First input') digest << 'Second input' # equivalent to digest.update('Second input') result = digest.digest
Returns self
updated with the message to be authenticated. Can be called repeatedly with chunks of the message.
first_chunk = 'The quick brown fox jumps ' second_chunk = 'over the lazy dog' instance.update(first_chunk) #=> 5b9a8038a65d571076d97fe783989e52278a492a instance.update(second_chunk) #=> de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9
pass
- string
name
- A string describing the key.
key
- Any PKey
.
cert
- A X509::Certificate
.
The public_key portion of the certificate must contain a valid public key.
The not_before and not_after fields must be filled in.
ca
- An optional array of X509::Certificate
‘s.
key_pbe
- string
cert_pbe
- string
key_iter
- integer
mac_iter
- integer
keytype
- An integer representing an MSIE specific extension.
Any optional arguments may be supplied as nil to preserve the OpenSSL
defaults.
See the OpenSSL
documentation for PKCS12_create().
Is this handler a streaming handler?