Creates a new Resolv::Hosts
, using filename
for its data source.
Creates a new DNS
resolver.
config_info
can be:
Uses /etc/resolv.conf.
String
Path to a file using /etc/resolv.conf’s format.
Hash
Must contain :nameserver, :search and :ndots keys.
:nameserver_port can be used to specify port number of nameserver address.
The value of :nameserver should be an address string or an array of address strings.
:nameserver => ‘8.8.8.8’
:nameserver => [‘8.8.8.8’, ‘8.8.4.4’]
The value of :nameserver_port should be an array of pair of nameserver address and port number.
:nameserver_port => [[‘8.8.8.8’, 53], [‘8.8.4.4’, 53]]
Example:
Resolv::DNS.new(:nameserver => ['210.251.121.21'], :search => ['ruby-lang.org'], :ndots => 1)
Creates a new one-shot Multicast DNS
(mDNS) resolver.
config_info
can be:
Uses the default mDNS addresses
Hash
Must contain :nameserver or :nameserver_port like Resolv::DNS#initialize.
Create an AttlistDecl
, pulling the information from a Source
. Notice that this isn’t very convenient; to create an AttlistDecl
, you basically have to format it yourself, and then have the initializer parse it. Sorry, but for the foreseeable future, DTD
support in REXML
is pretty weak on convenience. Have I mentioned how much I hate DTDs?
Constructor. FIXME: The parser doesn’t catch illegal characters in attributes
Either: an Attribute
, which this new attribute will become a clone of; or a String
, which is the name of this attribute
If first
is an Attribute
, then this may be an Element
, or nil. If nil, then the Element
parent of this attribute is the parent of the first
Attribute
. If the first argument is a String
, then this must also be a String
, and is the content of the attribute. If this is the content, it must be fully normalized (contain no illegal characters).
Ignored unless first
is a String
; otherwise, may be the Element
parent of this attribute, or nil.
Attribute.new( attribute_to_clone ) Attribute.new( attribute_to_clone, parent_element ) Attribute.new( "attr", "attr_value" ) Attribute.new( "attr", "attr_value", parent_element )
Constructor. CData is data between <![CDATA[ ... ]]>
Examples
CData.new( source ) CData.new( "Here is some CDATA" ) CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element )
Constructor. Any inheritors of this class should call super to make sure this method is called.
if supplied, the parent of this child will be set to the supplied value, and self will be added to the parent
Constructor. The first argument can be one of three types: @param first If String
, the contents of this comment are set to the argument. If Comment
, the argument is duplicated. If Source
, the argument is scanned for a comment. @param second If the first argument is a Source
, this argument should be nil, not supplied, or a Parent
to be set as the parent of this object