diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2021-05-18 01:01:09 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2021-05-18 01:01:09 -0600 |
| commit | 0a09ab16e52fcbc856dafe31c5a0c3cbcae86162 (patch) | |
| tree | b3f615c9b80edea3407598fd9a1512066ee64318 /lib | |
| parent | 5395dc01e5487ac309cfba51f0898e21f4650008 (diff) | |
define setter method for text using attr_writer on ListItem [skip ci]
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/asciidoctor/list.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/asciidoctor/list.rb b/lib/asciidoctor/list.rb index b74392e4..c9d48869 100644 --- a/lib/asciidoctor/list.rb +++ b/lib/asciidoctor/list.rb @@ -78,12 +78,8 @@ class ListItem < AbstractBlock @text && (apply_subs @text, @subs) end - # Public: Set the String text. - # - # Returns the new String text assigned to this ListItem - def text= val - @text = val - end + # Public: Set the String text assigned to this ListItem + attr_writer :text # Check whether this list item has simple content (no nested blocks aside from a single outline list). # Primarily relevant for outline lists. |
