Iterates over the attributes of an Element
. Yields actual Attribute
nodes, not String
values.
doc = Document.new '<a x="1" y="2"/>' doc.root.attributes.each_attribute {|attr| p attr.expanded_name+" => "+attr.value }
Defaults to use Ruby’s program prefix and suffix.
This is ported over from the yaml_tree in 1.9.3
File
Fetcher. Dispatched by fetch_path
. Use it instead.
HTTP Fetcher. Dispatched by fetch_path
. Use it instead.
Returns the size of uri
in bytes.
Returns true when it is possible and safe to update the cache directory.
Fetches a specification for the given name_tuple
.
Implementation for Specification#validate_metadata
Returns the make command for the current platform. For versions of Ruby built on MS Windows with VC++ or Borland it will return ‘nmake’. On all other platforms, including Cygwin, it will return ‘make’.
Returns the make command for the current platform. For versions of Ruby built on MS Windows with VC++ or Borland it will return ‘nmake’. On all other platforms, including Cygwin, it will return ‘make’.
Returns whether or not the nmake command could be found.
Checks the scheme v
component against the URI::Parser
Regexp
for :SCHEME.
Checks the path v
component for RFC2396 compliance and against the URI::Parser
Regexp
for :ABS_PATH and :REL_PATH.
Can not have a opaque component defined, with a path component defined.
Returns a conversion path.
p Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP") #=> [[#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>], # [#<Encoding:UTF-8>, #<Encoding:EUC-JP>]] p Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP", universal_newline: true) or p Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP", newline: :universal) #=> [[#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>], # [#<Encoding:UTF-8>, #<Encoding:EUC-JP>], # "universal_newline"] p Encoding::Converter.search_convpath("ISO-8859-1", "UTF-32BE", universal_newline: true) or p Encoding::Converter.search_convpath("ISO-8859-1", "UTF-32BE", newline: :universal) #=> [[#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>], # "universal_newline", # [#<Encoding:UTF-8>, #<Encoding:UTF-32BE>]]
Wraps text
to wrap
characters and optionally indents by indent
characters
Normalizes a request path. Raises an exception if the path cannot be normalized.