Class: REXML::Attributes
- Inherits:
-
Object
- Object
- REXML::Attributes
- Defined in:
- lib/test/unit/xml/attributes_mixin.rb
Overview
The REXML::Attributes mix-in adds methods that are useful for attribute collections, but not present in the standard REXML::Attributes class
Instance Method Summary collapse
-
#get_attribute_ns(namespace, name) ⇒ Object
The
get_attribute_ns
method retrieves a method by its namespace and name.
Instance Method Details
#get_attribute_ns(namespace, name) ⇒ Object
The get_attribute_ns
method retrieves a method by its namespace and name. Thus it is possible to reliably identify an attribute even if an XML processor has changed the prefix.
11 12 13 14 15 16 17 18 19 |
# File 'lib/test/unit/xml/attributes_mixin.rb', line 11 def get_attribute_ns(namespace, name) each_attribute() { |attribute| if name == attribute.name && namespace == attribute.namespace() return attribute end } nil end |