Method: Ox::Element#remove_children
- Defined in:
- lib/ox/element.rb
#remove_children(*children) ⇒ Object
Remove all the children matching the path provided
Examples are:
-
element.remove_children(Ox:Element)removes the element passed as argument if child of the element. -
element.remove_children(Ox:Element, Ox:Element)removes the list of elements passed as argument if children of the element. -
children[Array] array of OX
191 192 193 194 195 196 |
# File 'lib/ox/element.rb', line 191 def remove_children(*children) return self if children.compact.empty? recursive_children_removal(children.compact.map { |c| c.object_id }) self end |