Sha256: 8caf3174aee509e121beb70d5089d3d65a63f5832832032ff4de583fda212883

Contents?: true

Size: 337 Bytes

Versions: 2

Compression:

Stored size: 337 Bytes

Contents

module Docxtor2
  class DocumentBuilder
    class << self
      def build(&block)
        instance = new(block)
        instance.document
      end
    end

    def initialize(block)
      content = ContentBuilder.build(&block)
      @document = Package::Document.new(content)
    end

    def document
      @document
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
docxtor2-0.0.9 lib/docxtor2/document_builder.rb
docxtor2-0.1.0 lib/docxtor2/document_builder.rb