lib/lolsoap/builder.rb in lolsoap-0.2.0 vs lib/lolsoap/builder.rb in lolsoap-0.3.0
- old
+ new
@@ -50,14 +50,18 @@
end
# Add a tag manually, rather than through method_missing. This is so you can still
# add tags for the very small number of tags that are also existing methods.
def __tag__(name, *args, &block)
- __prefixed_tag__(@type.prefix, @type.sub_type(name.to_s), name, *args, &block)
+ __prefixed_tag__(@type.element_prefix(name.to_s), @type.sub_type(name.to_s), name, *args, &block)
end
def __attribute__(name, value)
@node[name.to_s] = value.to_s
+ end
+
+ def __content__(value)
+ @node.content = value
end
# @private
def __prefixed_tag__(prefix, sub_type, name, *args)
sub_node = @node.document.create_element(name.to_s, *args)