Module: PureDocx::ClassMethods

Defined in:
lib/puredocx.rb

Instance Method Summary collapse

Instance Method Details

#create(file_path, options = {}) {|doc| ... } ⇒ Object

Yields:

  • (doc)


12
13
14
15
16
17
18
# File 'lib/puredocx.rb', line 12

def create(file_path, options = {})
  doc = Document.new(file_path, options)

  yield doc if block_given?

  doc.save!
end