Convert an object reference id to an object.
This implementation looks up the reference id in the local object space and returns the object it refers to.
Convert an object into a reference id.
This implementation returns the object’s __id__ in the local object space.
Turns this IPv4
address into a Resolv::DNS::Name
.
Turns this IPv6
address into a Resolv::DNS::Name
.
Full path of the target library file. If the file is not in this gem, return nil.
Return a Gem::Specification
from this gem
Turn an array of NameTuple
objects back into an array of
tuples.
Copies this package to path
(if possible)
Gzips content written to gz_io
to io
.
Returns a Ruby code representation of this specification, such that it can be eval’ed and reconstruct the same specification later. Attributes that still have their default values are omitted.
Returns self
Checks the to v
component.
Private setter for to v
.
Returns the RFC822 e-mail text equivalent of the URL, as a String
.
Example:
require 'uri' uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr") uri.to_mailtext # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n"
Converts the contents of the database to an in-memory Hash
object, and returns it.
Returns a hash of the key/value pairs:
req = Net::HTTP::Get.new(uri) req.to_hash # => {"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"], "accept"=>["*/*"], "user-agent"=>["Ruby"], "host"=>["jsonplaceholder.typicode.com"]}
Serializes the private key to DER-encoded PKCS #8 format. If called without arguments, unencrypted PKCS #8 PrivateKeyInfo format is used. If called with a cipher name and a password, PKCS #8 EncryptedPrivateKeyInfo format with PBES2 encryption scheme is used.
Serializes the private key to PEM-encoded PKCS #8 format. See private_to_der
for more details.