APIdock / Ruby
/
method

clone

ruby latest stable - Class: REXML ::Element
clone()
public

Creates a shallow copy of self.

d = Document .new  "<a><b/><b/><c><d/></c></a>"
new_a = d.root .clone 
puts new_a # => "<a/>"
# File lib/rexml/element.rb, line 97
 def clone
 self.class.new self
 end

AltStyle によって変換されたページ (->オリジナル) /