Add builder pattern for paragraph, lists, tables
This commit is contained in:
20
lib/ezdoc/nodes/list_item.rb
Normal file
20
lib/ezdoc/nodes/list_item.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Ezdoc
|
||||
module Nodes
|
||||
class ListItem < Base
|
||||
attr_reader :runs, :list_type, :num_id
|
||||
|
||||
def initialize(runs = [], list_type:, num_id:)
|
||||
super()
|
||||
@runs = runs
|
||||
@list_type = list_type
|
||||
@num_id = num_id
|
||||
end
|
||||
|
||||
def add_run(run)
|
||||
@runs << run
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user