Add builder pattern for paragraph, lists, tables

This commit is contained in:
2025-12-02 10:57:54 +01:00
parent 50c9c20eca
commit b602b2a2ff
25 changed files with 1248 additions and 47 deletions

20
lib/ezdoc/nodes/list.rb Normal file
View File

@@ -0,0 +1,20 @@
# frozen_string_literal: true
module Ezdoc
module Nodes
class List < Base
attr_reader :items, :type, :num_id
def initialize(type:, num_id:)
super()
@type = type
@num_id = num_id
@items = []
end
def add_item(item)
@items << item
end
end
end
end