Class: Coradoc::AsciiDoc::Model::Inline::Bold

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

Overview

Bold inline text formatting for AsciiDoc documents.

Bold text is rendered with asterisks: *bold text*.

Examples:

Create bold text

bold = Coradoc::AsciiDoc::Model::Inline::Bold.new
bold.content = "Important text"
bold.to_adoc # => "*Important text*"

See Also:

Instance Attribute Summary collapse

Attributes inherited from Base

#id

Method Summary

Methods inherited from Base

#inline?

Methods inherited from Base

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

Instance Attribute Details

#contentString, Array<Lutaml::Model::Serializable> (readonly)

Returns The text content to format as bold.

Returns:

  • (String, Array<Lutaml::Model::Serializable>)

    The text content to format as bold



25
26
27
28
29
30
31
32
33
34
# File 'lib/coradoc/asciidoc/model/inline/bold.rb', line 25

class Bold < Base
  attribute :content,
            Lutaml::Model::Serializable,
            default: -> { nil },
            polymorphic: [
              Lutaml::Model::Type::String,
              :array
            ]
  attribute :unconstrained, :boolean, default: -> { true }
end

#unconstrainedBoolean (readonly)

Returns Whether to use unconstrained formatting (default: true).

Returns:

  • (Boolean)

    Whether to use unconstrained formatting (default: true)



25
26
27
28
29
30
31
32
33
34
# File 'lib/coradoc/asciidoc/model/inline/bold.rb', line 25

class Bold < Base
  attribute :content,
            Lutaml::Model::Serializable,
            default: -> { nil },
            polymorphic: [
              Lutaml::Model::Type::String,
              :array
            ]
  attribute :unconstrained, :boolean, default: -> { true }
end