This method sends a message. If msgstr is given, sends it as a message. If block is given, yield a message writer stream. You must write message before the block is closed.
# Example 1 (by string) smtp.data(<<EndMessage) From: john@example.com To: betty@example.com Subject: I found a bug Check vm.c:58879. EndMessage # Example 2 (by block) smtp.data {|f| f.puts "From: john@example.com" f.puts "To: betty@example.com" f.puts "Subject: I found a bug" f.puts "" f.puts "Check vm.c:58879." }
Adds sw according to sopts, lopts and nlopts.
swOptionParser::Switch instance to be added.
soptsShort style option list.
loptsLong style option list.
nloptsNegated long style options list.
Completion for hash key.
Default stringizing method to emit standard error message.
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:
Example:
dns.timeouts = 3
Creates a new IPv6 address from arg which may be:
Sets the element of which this object is an attribute. Normally, this is not directly called.
Returns this attribute
Sets the parent of this child to the supplied argument.
Must be a Parent object. If this object is the same object as the existing parent of this child, no action is taken. Otherwise, this child is removed from the current parent (if one exists), and is added to the new parent.
The parent added
the document this child belongs to, or nil if this child
belongs to no document
This method returns a list of notations that have been declared in the internal DTD subset. Notations in the external DTD subset are not listed.
Method contributed by Henrik Martensson
Retrieves a named notation. Only notations declared in the internal DTD subset can be retrieved.
Method contributed by Henrik Martensson
Evaluates to the document to which this element belongs, or nil if this element doesn’t belong to a document.
Evaluates to true if whitespace is respected for this element. This is the case if:
Neither :respect_whitespace nor :compress_whitespace has any value
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.
Get an array of all CData children. IMMUTABLE
Get an array of all Comment children. IMMUTABLE
Returns the number of attributes the owning Element contains.
doc = Document "<a x='1' y='2' foo:x='3'/>" doc.root.attributes.length #-> 3
Evaluates whether the given string matches an entity definition, returning true if so, and false otherwise.