Set
the number of seconds to wait until timing-out a read(2) call.
Iterates over all IP addresses for name
retrieved from the hosts file.
Iterates over all IP addresses for name
retrieved from the DNS
resolver.
name
can be a Resolv::DNS::Name
or a String. Retrieved addresses will be a Resolv::IPv4
or Resolv::IPv6
Iterates over all typeclass
DNS
resources for name
. See getresource
for argument details.
Turns this IPv4
address into a Resolv::DNS::Name
.
Turns this IPv6
address into a Resolv::DNS::Name
.
Iterates over all IP addresses for name
retrieved from the mDNS resolver, provided name ends with “local”. If the name does not end in “local” no records will be returned.
name
can be a Resolv::DNS::Name
or a String. Retrieved addresses will be a Resolv::IPv4
or Resolv::IPv6
Replaces this object with another object. Basically, calls Parent.replace_child
self
Sets the previous sibling of this child. This can be used to insert a child before some other child.
a = Element.new("a") b = a.add_element("b") c = Element.new("c") b.previous_sibling = c # => <a><b/><c/></a>
Method
contributed by Henrik Martensson
@return the XMLDecl
standalone value of this document as a String. If no XMLDecl
has been set, returns the default setting.
Returns the previous sibling that is an element, or nil if there is no Element
sibling prior to this one
doc = Document.new '<a><b/>text<c/></a>' doc.root.elements['c'].previous_element #-> <b/> doc.root.elements['b'].previous_element #-> nil
Replaces one child with another, making sure the nodelist is correct @param to_replace the child to replace (must be a Child
) @param replacement the child to insert into the nodelist (must be a Child
)
Generates a Source
object @param arg Either a String, or an IO
@return a Source
, or nil if a bad argument was given
@return the current line in the source
@return the current line in the source
Reorders an array of nodes so that they are in document order It tries to do this efficiently.
FIXME: I need to get rid of this, but the issue is that most of the XPath
interpreter functions as a filter, which means that we lose context going in and out of function calls. If I knew what the index of the nodes was, I wouldn’t have to do this. Maybe add a document IDX for each node? Problems with mutable documents. Or, rewrite everything.
Reads all tuples matching tuple
from the proxied TupleSpace
. See TupleSpace#read_all
.