Skip to content

Commit fe2f425

Browse files
committed
Correct documentation
1 parent 6522c81 commit fe2f425

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ p_child = p_element.at_xpath("//child::*") # selects first child
186186
require 'docx'
187187

188188
d = Docx::Document.open('example.docx')
189-
existing_style = d.styles_config.style_of("Heading 1")
189+
existing_style = d.styles_configuration.style_of("Heading 1")
190190
existing_style.font_color = "000000"
191191

192192
# see attributes below
193-
new_style = d.styles_config.add_style("Red", name: "Red", font_color: "FF0000", font_size: 20)
193+
new_style = d.styles_configuration.add_style("Red", name: "Red", font_color: "FF0000", font_size: 20)
194194
new_style.bold = true
195195

196196
d.paragraphs.each do |p|
@@ -201,7 +201,7 @@ d.paragraphs.each do |p|
201201
p.style = "Heading 1"
202202
end
203203

204-
d.styles_config.remove_style("Red")
204+
d.styles_configuration.remove_style("Red")
205205
```
206206

207207
#### Style Attributes

0 commit comments

Comments
 (0)