Method: ActiveComponent::Base#detached_copy
- Defined in:
- lib/active_component/base.rb
#detached_copy ⇒ Tree::TreeNode
Returns a copy of the receiver node, with its parent and children links removed. The original node remains attached to its tree.
237 238 239 |
# File 'lib/active_component/base.rb', line 237 def detached_copy Tree::TreeNode.new(@node_name, @node_content ? @node_content.clone : nil) end |