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