Results for: "OptionParser"

Sets the resolver timeouts. This may be a single positive number or an array of positive numbers representing timeouts in seconds. If an array is specified, a DNS request will retry and wait for each successive interval in the array until a successful response is received. Specifying nil reverts to the default timeouts:

5, second = 5 * 2 / nameserver_count, 2 * second, 4 * second

Example:

dns.timeouts = 3

Closes the DNS resolver.

Gets all IP addresses for name from the DNS resolver.

name can be a Resolv::DNS::Name or a String. Retrieved addresses will be a Resolv::IPv4 or Resolv::IPv6

Returns the namespace URL, if defined, or nil otherwise

e = Element.new("el")
e.add_namespace("ns", "http://url")
e.add_attribute("ns:a", "b")
e.add_attribute("nsx:a", "c")
e.attribute("ns:a").namespace # => "http://url"
e.attribute("nsx:a").namespace # => nil

Returns a copy of this attribute

No documentation available

Make a copy of this object

Examples

c = CData.new( "Some text" )
d = c.clone
d.to_s        # -> "Some text"
No documentation available
No documentation available
No documentation available
No documentation available

Should be obvious

Creates a shallow copy of self.

d = Document.new "<a><b/><b/><c><d/></c></a>"
new_a = d.root.clone
puts new_a  # => "<a/>"

Evaluates to true if whitespace is respected for this element. This is the case if:

  1. Neither :respect_whitespace nor :compress_whitespace has any value

  2. The context has :respect_whitespace set to :all or an array containing the name of this element, and :compress_whitespace isn’t set to :all or an array containing the name of this element.

The evaluation is tested against expanded_name, and so is namespace sensitive.

No documentation available

Evaluates to the URI for a prefix, or the empty string if no such namespace is declared for this element. Evaluates recursively for ancestors. Returns the default namespace, if there is one.

prefix

the prefix to search for. If not supplied, returns the default namespace if one exists

Returns

the namespace URI as a String, or nil if no such namespace exists. If the namespace is undefined, returns an empty string

doc = Document.new("<a xmlns='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
b = doc.elements['//b']
b.namespace           # -> '1'
b.namespace("y")      # -> '2'
No documentation available

Returns true if there are no Element children, false otherwise

Private helper class. Removes quotes from quoted strings

No documentation available
No documentation available
No documentation available
No documentation available

Given an array of nodes it filters the array based on the path. The result is that when this method returns, the array will contain elements which match the path

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