| Module | REXML::Namespace |
| In: |
|
Adds named attributes to an object.
Methods
Included Modules
Constants
| NAMESPLIT | = | /^(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})/u |
External Aliases
| name | -> | local_name |
Attributes
| expanded_name | [R] | The name of the object, valid if set |
| name | [R] | The name of the object, valid if set |
| prefix | [RW] | The expanded name of the object, valid if name is set |
Public Instance methods
Fully expand the name, even if the prefix wasn’t specified in the source file.
41: def fully_expanded_name 42: ns = prefix 43: return "#{ns}:#@name" if ns.size > 0 44: return @name 45: end
Compares names optionally WITH namespaces
27: def has_name?( other, ns=nil ) 28: if ns 29: return (namespace() == ns and name() == other) 30: elsif other.include? ":" 31: return fully_expanded_name == other 32: else 33: return name == other 34: end 35: end