Constructor @param parent if supplied, will be set as the parent of this object
Constructor @param arg must be a String
, and should be a valid XML
document @param encoding if non-null, sets the encoding of the source to this value, overriding all encoding detection
block_size has been deprecated
Creates a new SyncEnumerator
which enumerates rows of given Enumerable
objects.
Constructor arg
if a String
, the content is set to the String
. If a Text
, the object is shallowly cloned.
respect_whitespace
(boolean, false) if true, whitespace is respected
parent
(nil) if this is a Parent
object, the parent will be set to this.
raw
(nil) This argument can be given three values. If true, then the value of used to construct this object is expected to contain no unescaped XML
markup, and REXML
will not change the text. If this value is false, the string may contain any characters, and REXML
will escape any and all defined entities whose values are contained in the text. If this value is nil (the default), then the raw value of the parent will be used as the raw value for this node. If there is no raw value for the parent, and no value is supplied, the default is false. Use this field if you have entities defined for some text, and you don’t want REXML
to escape that text in output.
Text.new( "<&", false, nil, false ) #-> "<&" Text.new( "<&", false, nil, false ) #-> "&lt;&amp;" Text.new( "<&", false, nil, true ) #-> Parse exception Text.new( "<&", false, nil, true ) #-> "<&" # Assume that the entity "s" is defined to be "sean" # and that the entity "r" is defined to be "russell" Text.new( "sean russell" ) #-> "&s; &r;" Text.new( "sean russell", false, nil, true ) #-> "sean russell"
entity_filter
(nil) This can be an array of entities to match in the supplied text. This argument is only useful if raw
is set to false.
Text.new( "sean russell", false, nil, false, ["s"] ) #-> "&s; russell" Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell"
In the last example, the entity_filter
argument is ignored.
illegal
INTERNAL USE ONLY
Creates a new DRbObjectTemplate
that will match against uri
and ref
.
Creates a new TupleSpaceProxy
to wrap ts
.
Creates a new SimpleRenewer
that keeps an object alive for another sec
seconds.
Advertises ts
on the given addresses
at port
.
If addresses
is omitted only the UDP broadcast address is used.
addresses
can contain multiple addresses. If a multicast address is given in addresses
then the RingServer
will listen for multicast queries.
If you use IPv4 multicast you may need to set an address of the inbound interface which joins a multicast group.
ts = Rinda::TupleSpace.new rs = Rinda::RingServer.new(ts, [['239.0.0.1', '9.5.1.1']])
You can set addresses as an Array
Object
. The first element of the Array
is a multicast address and the second is an inbound interface address. If the second is omitted then ‘0.0.0.0’ is used.
If you use IPv6 multicast you may need to set both the local interface address and the inbound interface index:
rs = Rinda::RingServer.new(ts, [['ff02::1', '::1', 1]])
The first element is a multicast address and the second is an inbound interface address. The third is an inbound interface index.
At this time there is no easy way to get an interface index by name.
If the second is omitted then ‘::1’ is used. If the third is omitted then 0 (default interface) is used.
Creates a new RingFinger
that will look for RingServers at port
on the addresses in broadcast_list
.
If broadcast_list
contains a multicast address then multicast queries will be made using the given multicast_hops
and multicast_interface.
Creates a RingProvider
that will provide a klass
service running on front
, with a description
. renewer
is optional.
Creates a TupleEntry
based on ary
with an optional renewer or expiry time sec
.
A renewer must implement the renew
method which returns a Numeric
, nil, or true to indicate when the tuple has expired.
Creates a new NotifyTemplateEntry
that watches place
for +event+s that match tuple
.
Creates a new TupleSpace
. period
is used to control how often to look for dead tuples after modifications to the TupleSpace
.
If no dead tuples are found period
seconds after the last modification, the TupleSpace
will stop looking for dead tuples.