module Docx::Elements::Element::ClassMethods
Public Instance Methods
create_with(element)
click to toggle source
# File lib/docx/elements/element.rb, line 92 def create_with(element) # Need to somehow get the xml document accessible here by default, but this is alright in the interim self.new(Nokogiri::XML::Node.new("w:#{self.tag}", element.node)) end
create_within(element)
click to toggle source
# File lib/docx/elements/element.rb, line 97 def create_within(element) new_element = create_with(element) new_element.append_to(element) new_element end