85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# File 'lib/representable/xml/namespace.rb', line 85
def to_node(options={})
local_uri = representable_attrs.options[:local_namespace]
prefix = self.class.namespace_defs[local_uri]
root_tag = [prefix, representation_wrap(options)].compact.join(":")
options = { wrap: root_tag }.merge(options)
representable_attrs.keys.each do |property|
options[property.to_sym] = { show_definition: false, namespaces: options[:namespaces] }
end
super(options).tap do |node|
add_namespace_definitions!(node, self.class.namespace_defs) unless options[:show_definition] == false
end
end
|