a = Node.new a << “B” # => <a>B</a> a.b # => <a>B<b/></a> a.b # => <a>B<b/><b/><a> a.b[“x”] = “y” # => <a>B<b/><b x=“y”/></a> a.b.c # => <a>B<c/><b x=“y”/></a> a.b.c << “D” # => <a>B<c>D</c><b x=“y”/></a>
REXML
is an XML
toolkit for Ruby, in Ruby.
REXML
is a pure Ruby, XML
1.0 conforming, non-validating toolkit with an intuitive API. REXML
passes 100% of the non-validating Oasis tests, and provides tree, stream, SAX2, pull, and lightweight APIs. REXML
also includes a full XPath 1.0 implementation. Since Ruby 1.8, REXML
is included in the standard Ruby distribution.
This API documentation can be downloaded from the REXML
home page, or can be accessed online
A tutorial is available in the REXML
distribution in docs/tutorial.html, or can be accessed online
This library is an interface to secure random number generators which are suitable for generating session keys in HTTP cookies, etc.
You can use this library in your application by requiring it:
require 'securerandom'
It supports the following secure random number generators:
openssl
/dev/urandom
Win32
Generate random hexadecimal strings:
require 'securerandom' SecureRandom.hex(10) #=> "52750b30ffbc7de3b362" SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559" SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23"
Generate random base64 strings:
SecureRandom.base64(10) #=> "EcmTPZwWRAozdA==" SecureRandom.base64(10) #=> "KO1nIU+p9DKxGg==" SecureRandom.base64(12) #=> "7kJSM/MzBJI+75j8"
Generate random binary strings:
SecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301" SecureRandom.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337"
Generate alphanumeric strings:
SecureRandom.alphanumeric(10) #=> "S8baxMJnPl" SecureRandom.alphanumeric(10) #=> "aOxAg8BAJe"
Generate UUIDs:
SecureRandom.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" SecureRandom.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab"
An SSLContext
is used to set various options regarding certificates, algorithms, verification, session caching, etc. The SSLContext
is used to create an SSLSocket
.
All attributes must be set before creating an SSLSocket
as the SSLContext
will be frozen afterward.
Configuration options for dumping YAML.
SSLConfig
handles the needed SSL information for establishing a DRbSSLSocket
connection, including generating the X509 / RSA pair.
An instance of this config can be passed to DRbSSLSocket.new
, DRbSSLSocket.open
and DRbSSLSocket.open_server
See DRb::DRbSSLSocket::SSLConfig.new
for more details
See Net::HTTPGenericRequest
for attributes and methods.
An alternate to Gem::Commands::QueryCommand
that searches for gems starting with the supplied argument.
Used internally to indicate that a dependency conflicted with a spec that would be activated.
A set of gems for installation sourced from remote sources and local .gem files
Represents an installed gem. This is used for dependency resolution.
Raised by Encoding
and String
methods when the source encoding is incompatible with the target encoding.