Class: VCDOM::ElementNS
Overview
Instance Method Summary
collapse
Methods inherited from Element
#append_child, #attributes, #child_element_count, #each_attr_node, #first_element_child, #get_attribute, #get_attribute_ns, #last_element_child, #next_element_sibling, #normalize_namespaces, #previous_element_sibling, #set_attribute, #set_attribute_node, #set_attribute_node_ns, #set_attribute_ns
Methods included from Child
#_leave_from_tree, #_set_next_sibling, #_set_parent_node, #initialize_child, #next_sibling, #parent_node, #previous_sibling
Constructor Details
#initialize(doc, namespace_uri, prefix, local_name) ⇒ ElementNS
12
13
14
15
16
|
# File 'lib/vcdom/element_ns.rb', line 12
def initialize( doc, namespace_uri, prefix, local_name )
super( doc, local_name )
@namespace_uri = namespace_uri
@prefix = prefix
end
|
Instance Method Details
#local_name ⇒ Object
34
35
36
|
# File 'lib/vcdom/element_ns.rb', line 34
def local_name
@local_name.to_s()
end
|
#namespace_uri ⇒ Object
37
38
39
|
# File 'lib/vcdom/element_ns.rb', line 37
def namespace_uri
@namespace_uri.nil? ? nil : @namespace_uri.to_s()
end
|
#node_type ⇒ Object
18
19
20
|
# File 'lib/vcdom/element_ns.rb', line 18
def node_type
ELEMENT_NODE
end
|
#prefix ⇒ Object
31
32
33
|
# File 'lib/vcdom/element_ns.rb', line 31
def prefix
@prefix.nil? ? nil : @prefix.to_s()
end
|
#tag_name ⇒ Object
Also known as:
node_name
22
23
24
25
26
27
28
|
# File 'lib/vcdom/element_ns.rb', line 22
def tag_name
if @prefix then
"#{@prefix.to_s}:#{@local_name.to_s}"
else
@local_name.to_s()
end
end
|