Results for: "Dir.chdir"

Iterates through all of the child Elements, optionally filtering them by a given XPath

xpath

optional. If supplied, this is a String XPath, and is used to filter the children, so that only matching children are yielded. Note that XPaths are automatically filtered for Elements, so that non-Element children will not be yielded

doc = Document.new '<a><b/><c/><d/>sean<b/><c/><d/></a>'
doc.root.elements.each {|e|p e}       #-> Yields b, c, d, b, c, d elements
doc.root.elements.each('b') {|e|p e}  #-> Yields b, b elements
doc.root.elements.each('child::node()')  {|e|p e}
#-> Yields <b/>, <c/>, <d/>, <b/>, <c/>, <d/>
XPath.each(doc.root, 'child::node()', &block)
#-> Yields <b/>, <c/>, <d/>, sean, <b/>, <c/>, <d/>

Iterates over each attribute of an Element, yielding the expanded name and value as a pair of Strings.

doc = Document.new '<a x="1" y="2"/>'
doc.root.attributes.each {|name, value| p name+" => "+value }

Evaluates whether the given string matches an entity definition, returning true if so, and false otherwise.

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

Enumerates rows of the Enumerable objects.

check for illegal characters

Iterates over nodes that match the given path, calling the supplied block with the match.

element

The context element

path

The xpath to search for. If not supplied or nil, defaults to ‘*’

namespaces

If supplied, a Hash which defines a namespace mapping

variables

If supplied, a Hash which maps $variables in the query to values. This can be used to avoid XPath injection attacks or to automatically handle escaping string values.

XPath.each( node ) { |el| ... }
XPath.each( node, '/*[@attr='v']' ) { |el| ... }
XPath.each( node, 'ancestor::x' ) { |el| ... }
XPath.each( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) \
  {|el| ... }

Returns an array of nodes matching a given XPath.

No documentation available

Fetches item k from the tuple.

Iterate through the tuple, yielding the index or key, and the value, thus ensuring arrays are iterated similarly to hashes.

Matches this template against tuple. The tuple must be the same size as the template. An element with a nil value in a template acts as a wildcard, matching any value in the corresponding position in the tuple. Elements of the template match the tuple if the are == or ===.

Template.new([:foo, 5]).match   Tuple.new([:foo, 5]) # => true
Template.new([:foo, nil]).match Tuple.new([:foo, 5]) # => true
Template.new([String]).match    Tuple.new(['hello']) # => true

Template.new([:foo]).match      Tuple.new([:foo, 5]) # => false
Template.new([:foo, 6]).match   Tuple.new([:foo, 5]) # => false
Template.new([:foo, nil]).match Tuple.new([:foo])    # => false
Template.new([:foo, 6]).match   Tuple.new([:foo])    # => false

Iterates over all discovered TupleSpaces starting with the primary.

Fetches key from the tuple.

Matches this TemplateEntry against tuple. See Template#match for details on how a Template matches a Tuple.

Yields event/tuple pairs until this NotifyTemplateEntry expires.

No documentation available
No documentation available

Yields each Tuple in this AvailableSet

No documentation available
Search took: 4ms  ·  Total Results: 1135