Method: REXML::Object::ReflectiveElementList#<<
- Defined in:
- lib/voruby/misc/rexml_ext.rb
#<<(element) ⇒ Object
26 27 28 29 30 |
# File 'lib/voruby/misc/rexml_ext.rb', line 26 def <<(element) path = "#{self.xpath.first}[last()]" last = XPath.first(self.parent, path, self.xpath.last) last ? last.next_sibling = element : self.parent << element end |