lib/asciidoctor/abstract_block.rb in asciidoctor-2.0.16 vs lib/asciidoctor/abstract_block.rb in asciidoctor-2.0.17
- old
+ new
@@ -9,11 +9,11 @@
# Public: Describes the type of content this block accepts and how it should be converted. Acceptable values are:
# * :compound - this block contains other blocks
# * :simple - this block holds a paragraph of prose that receives normal substitutions
# * :verbatim - this block holds verbatim text (displayed "as is") that receives verbatim substitutions
- # * :raw - this block holds unprocessed content passed directly to the output with no sustitutions applied
+ # * :raw - this block holds unprocessed content passed directly to the output with no substitutions applied
# * :empty - this block has no content
attr_accessor :content_model
# Public: Set the Integer level of this {Section} or the level of the Section to which this {AbstractBlock} belongs.
attr_accessor :level
@@ -127,15 +127,17 @@
@blocks.empty? ? false : true
end
# Public: Check whether this block has any child Section objects.
#
- # Only applies to Document and Section instances
+ # Acts an an abstract method that always returns false unless this block is an
+ # instance of Document or Section.
+ # Both Document and Section provide overrides for this method.
#
- # Returns A [Boolean] to indicate whether this block has child Section objects
+ # Returns false
def sections?
- @next_section_index > 0
+ false
end
# Deprecated: Legacy property to get the String or Integer numeral of this section.
def number
(Integer @numeral) rescue @numeral
@@ -267,10 +269,10 @@
# Returns the single-character [String] keyword that represents the marker for the specified list type
def list_marker_keyword list_type = nil
ORDERED_LIST_KEYWORDS[list_type || @style]
end
- # Public: Get the String title of this Block with title substitions applied
+ # Public: Get the String title of this Block with title substitutions applied
#
# The following substitutions are applied to block and section titles:
#
# :specialcharacters, :quotes, :replacements, :macros, :attributes and :post_replacements
#