Retrieves key
from the GW
Access the attlist attribute/value pairs.
value = attlist_decl[ attribute_name ]
Fetches a child element. Filters only Element
children, regardless of the XPath
match.
the search parameter. This is either an Integer
, which will be used to find the index’th child Element
, or an XPath
, which will be used to search for the Element
. Because of the nature of XPath searches, any element in the connected XML document can be fetched through any other element. The Integer index is 1-based, not 0-based. This means that the first child element is at index 1, not 0, and the +n+th element is at index n
, not n-1
. This is because XPath
indexes element children starting from 1, not 0, and the indexes should be the same.
optional, and only used in the first argument is an Integer
. In that case, the index’th child Element
that has the supplied name will be returned. Note again that the indexes start at 1.
the first matching Element
, or nil if no child matched
doc = Document.new '<a><b/><c id="1"/><c id="2"/><d/></a>' doc.root.elements[1] #-> <b/> doc.root.elements['c'] #-> <c id="1"/> doc.root.elements[2,'c'] #-> <c id="2"/>
Fetches an attribute value. If you want to get the Attribute
itself, use get_attribute
()
an XPath
attribute name. Namespaces are relevant here.
the String value of the matching attribute, or nil
if no matching attribute was found. This is the unnormalized value (with entities expanded).
doc = Document.new "<a foo:att='1' bar:att='2' att='<'/>" doc.root.attributes['att'] #-> '<' doc.root.attributes['bar:att'] #-> '2'
Fetches a child at a given index @param index the Integer
index of the child to fetch
Accessor method for elements of the tuple.
Retrieves key
from the tuple.
Returns a Command instance for command_name
Return the configuration information for key
.
Reads key
from the configuration
Retrieves header_name
Retrieves the response header field
Retrieves key
from the configuration
Return value associated with key
from database.
Returns nil
if there is no such key
.
See fetch
for more information.
Returns the function mapped to name
, that was created by either Fiddle::Importer.extern
or Fiddle::Importer.bind
Get the value for the parameter with a given key.
If the parameter has multiple values, only the first will be retrieved; use params
to get the array of values.
Returns the header field corresponding to the case-insensitive key. For example, a key of “Content-Type” might return “text/html”
Returns the maker for the version
Returns the status class corresponding to code
WEBrick::HTTPStatus[302] => WEBrick::HTTPStatus::NotFound
A node-set is converted to a string by returning the string-value of the node in the node-set that is first in document order. If the node-set is empty, an empty string is returned.
A number is converted to a string as follows
NaN is converted to the string NaN
positive zero is converted to the string 0
negative zero is converted to the string 0
positive infinity is converted to the string Infinity
negative infinity is converted to the string -Infinity
if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative
otherwise, the number is represented in decimal form as a Number including a decimal point with at least one digit before the decimal point and at least one digit after the decimal point, preceded by a minus sign (-) if the number is negative; there must be no leading zeros before the decimal point apart possibly from the one required digit immediately before the decimal point; beyond the one required digit after the decimal point there must be as many, but only as many, more digits as are needed to uniquely distinguish the number from all other IEEE 754 numeric values.
The boolean false value is converted to the string false. The boolean true value is converted to the string true.
An object of a type other than the four basic types is converted to a string in a way that is dependent on that type.
Returns a complex which denotes the string form. The parser ignores leading whitespaces and trailing garbage. Any digit sequences can be separated by an underscore. Returns zero for null or garbage string.
'9'.to_c #=> (9+0i) '2.5'.to_c #=> (2.5+0i) '2.5/1'.to_c #=> ((5/2)+0i) '-3/2'.to_c #=> ((-3/2)+0i) '-i'.to_c #=> (0-1i) '45i'.to_c #=> (0+45i) '3-4i'.to_c #=> (3-4i) '-4e2-4e-2i'.to_c #=> (-400.0-0.04i) '-0.0-0.0i'.to_c #=> (-0.0-0.0i) '1/2+3/4i'.to_c #=> ((1/2)+(3/4)*i) 'ruby'.to_c #=> (0+0i)
See Kernel.Complex
.
Convert string
to a BigDecimal
and return it.
require 'bigdecimal' require 'bigdecimal/util' "0.5".to_d # => #<BigDecimal:1dc69e0,'0.5E0',9(18)>