Class: Coradoc::AsciiDoc::Model::CommentBlock

Inherits:
Base
  • Object
show all
Defined in:
lib/coradoc/asciidoc/model/comment_block.rb

Overview

Comment block element for AsciiDoc documents.

Comment blocks contain multi-line comments that are not part of the final document output.

Examples:

Create a comment block

comment = Coradoc::AsciiDoc::Model::CommentBlock.new
comment.text = "This is a multi-line comment"

See Also:

Instance Attribute Summary collapse

Attributes inherited from Base

#id

Instance Method Summary collapse

Methods inherited from Base

#inline?, #serialize_content, #simplify_block_content, #to_adoc, #to_h, visit, #visit

Instance Attribute Details

#line_breakString (readonly)

Returns Line break character (default: “n”).

Returns:

  • (String)

    Line break character (default: “n”)



23
24
25
26
27
28
29
30
# File 'lib/coradoc/asciidoc/model/comment_block.rb', line 23

class CommentBlock < Base
  def block_level?
    true
  end

  attribute :text, :string
  attribute :line_break, :string, default: -> { "\n" }
end

#textString (readonly)

Returns The comment text.

Returns:

  • (String)

    The comment text



23
24
25
26
27
28
29
30
# File 'lib/coradoc/asciidoc/model/comment_block.rb', line 23

class CommentBlock < Base
  def block_level?
    true
  end

  attribute :text, :string
  attribute :line_break, :string, default: -> { "\n" }
end

Instance Method Details

#block_level?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/coradoc/asciidoc/model/comment_block.rb', line 24

def block_level?
  true
end