Module: REXML::Namespace
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
XMLTokens
|
|
Defined in: | lib/rexml/namespace.rb |
Overview
Adds named attributes to an object.
Constant Summary
-
NAMESPLIT =
# File 'lib/rexml/namespace.rb', line 12/^(?:(#{NCNAME_STR}):)?(#{NCNAME_STR})/u
XMLTokens - Included
NAME, NAMECHAR, NAME_CHAR, NAME_START_CHAR, NAME_STR, NCNAME_STR, NMTOKEN, NMTOKENS, REFERENCE
Instance Attribute Summary
-
#expanded_name
readonly
The name of the object, valid if set.
-
#local_name
readonly
Alias for #name.
-
#name
(also: #local_name)
rw
The name of the object, valid if set.
-
#name=(name)
rw
Sets the name and the expanded name.
-
#prefix
rw
The expanded name of the object, valid if name is set.
Instance Method Summary
-
#fully_expanded_name
Fully expand the name, even if the prefix wasn't specified in the source file.
-
#has_name?(other, ns = nil) ⇒ Boolean
Compares names optionally WITH namespaces.
Instance Attribute Details
#expanded_name (readonly)
The name of the object, valid if set
# File 'lib/rexml/namespace.rb', line 8
attr_reader :name, :
#local_name (readonly)
Alias for #name.
# File 'lib/rexml/namespace.rb', line 38
alias :local_name :name
#name (rw) Also known as: #local_name
The name of the object, valid if set
# File 'lib/rexml/namespace.rb', line 8
attr_reader :name, :
#name=(name) (rw)
Sets the name and the expanded name
#prefix (rw)
The expanded name of the object, valid if name is set
# File 'lib/rexml/namespace.rb', line 10
attr_accessor :prefix
Instance Method Details
#fully_expanded_name
Fully expand the name, even if the prefix wasn't specified in the source file.
# File 'lib/rexml/namespace.rb', line 42
def ns = prefix return "#{ns}:#@name" if ns.size > 0 return @name end
#has_name?(other, ns = nil) ⇒ Boolean
Compares names optionally WITH namespaces