Class: Nokogiri::XML::Node
- Inherits:
-
Object
- Object
- Nokogiri::XML::Node
- Defined in:
- lib/nokogiri/xml/node.rb
Instance Method Summary collapse
Instance Method Details
#add_first_child(content) ⇒ Object
4 5 6 7 8 9 10 |
# 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 end |