lib/ruby_speech/ssml/element.rb in ruby_speech-0.3.1 vs lib/ruby_speech/ssml/element.rb in ruby_speech-0.3.2
- old
+ new
@@ -44,21 +44,9 @@
else
new.inherit node
end
end
- # Inherit the attributes and children of an XML::Node
- #
- # @param [XML::Node] node the node to inherit
- # @return [self]
- def inherit(node)
- inherit_attrs node.attributes
- node.children.each do |c|
- self << c.dup
- end
- self
- end
-
def self.new(element_name, atts = {}, &block)
blk_proc = lambda do |new_node|
atts.each_pair { |k, v| new_node.send :"#{k}=", v }
block_return = new_node.instance_eval &block if block_given?
new_node << new_node.encode_special_chars(block_return) if block_return.is_a?(String)