Returns true if type is “xhtml”.
Adds a dependency on gem dependency
with type type
that requires requirements
. Valid types are currently :runtime
and :development
.
true if server advertises AUTH CRAM-MD5. You cannot get valid value before opening SMTP
session.
Iterates through the child elements, yielding for each Element
that has a particular attribute set.
the name of the attribute to search for
the value of the attribute
(optional) causes this method to return after yielding for this number of matching children
(optional) if supplied, this is an XPath
that filters the children to check.
doc = Document.new "<a><b @id='1'/><c @id='2'/><d @id='1'/><e/></a>" # Yields b, c, d doc.root.each_element_with_attribute( 'id' ) {|e| p e} # Yields b, d doc.root.each_element_with_attribute( 'id', '1' ) {|e| p e} # Yields b doc.root.each_element_with_attribute( 'id', '1', 1 ) {|e| p e} # Yields d doc.root.each_element_with_attribute( 'id', '1', 0, 'd' ) {|e| p e}
Iterates through the children, yielding for each Element
that has a particular text set.
the text to search for. If nil, or not supplied, will iterate over all Element
children that contain at least one Text
node.
(optional) causes this method to return after yielding for this number of matching children
(optional) if supplied, this is an XPath
that filters the children to check.
doc = Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>' # Yields b, c, d doc.each_element_with_text {|e|p e} # Yields b, c doc.each_element_with_text('b'){|e|p e} # Yields b doc.each_element_with_text('b', 1){|e|p e} # Yields d doc.each_element_with_text(nil, 0, 'd'){|e|p e}
Add a list of extra arguments for the given command. args
may be an array or a string to be split on white space.
Accessor for the specific extra args hash (self initializing).