Class: Nokogiri::XML::Node
Instance Method Summary collapse
Instance Method Details
#add_first_child(content) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/nokogiri/xml/node.rb', line 4 def add_first_child(content) if children.empty? add_child(content) else children.first.previous = content end self end |