Initial project setup

This commit is contained in:
2025-12-02 10:23:52 +01:00
commit 50c9c20eca
16 changed files with 340 additions and 0 deletions

26
lib/ezdoc/document.rb Normal file
View File

@@ -0,0 +1,26 @@
# frozen_string_literal: true
module Ezdoc
class Document
attr_reader :content
def self.create(path, &block)
doc = new
block.call(doc)
doc.save(path)
doc
end
def initialize
@content = []
end
def text(value)
@content << { text: value }
end
def save(path)
Package.new(self).save(path)
end
end
end