Class: Coradoc::AsciiDoc::Model::Inline::Strikethrough

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

Overview

Strikethrough inline text formatting for AsciiDoc documents.

Strikethrough text is rendered with line-through role: [.line-through]#text#.

Examples:

Create strikethrough text

strikethrough = Coradoc::AsciiDoc::Model::Inline::Strikethrough.new
strikethrough.content = "Deleted text"
strikethrough.to_adoc # => "[.line-through]#Deleted text#"

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 strikethrough.

Returns:

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

    The text content to format as strikethrough



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

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

#textString (readonly)

Returns Alternative text attribute (aliased to content).

Returns:

  • (String)

    Alternative text attribute (aliased to content)



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

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

#unconstrainedBoolean (readonly)

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

Returns:

  • (Boolean)

    Whether to use unconstrained formatting (default: false)



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

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