Class: Coradoc::AsciiDoc::Model::ReviewerNote

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

Overview

Reviewer note block element for AsciiDoc documents.

Reviewer notes capture feedback from document reviewers with metadata about who provided the feedback and when.

Examples:

Create a reviewer note

note = Coradoc::AsciiDoc::Model::ReviewerNote.new
note.reviewer = "John Doe"
note.date = "2024-01-15"
note.content = [Coradoc::AsciiDoc::Model::Paragraph.new]

Instance Attribute Summary collapse

Attributes inherited from Base

#id

Method Summary

Methods inherited from Base

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

Instance Attribute Details

#contentArray<Coradoc::AsciiDoc::Model::Base> (readonly)

Returns Polymorphic content (paragraphs, lists, admonitions, etc.).

Returns:



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/coradoc/asciidoc/model/reviewer_note.rb', line 32

class ReviewerNote < Base
  # Reviewer note attributes
  attribute :reviewer, :string
  attribute :date, :string
  attribute :from, :string
  attribute :to, :string

  # Content can be any AsciiDoc elements (paragraphs, lists, etc.)
  attribute :content,
            Coradoc::AsciiDoc::Model::Base,
            collection: true,
            initialize_empty: true,
            polymorphic: [
              Coradoc::AsciiDoc::Model::TextElement,
              Coradoc::AsciiDoc::Model::Paragraph,
              Coradoc::AsciiDoc::Model::Admonition,
              Coradoc::AsciiDoc::Model::LineBreak,
              Coradoc::AsciiDoc::Model::List::Core
            ]
end

#dateString? (readonly)

Returns Date of the review.

Returns:

  • (String, nil)

    Date of the review



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/coradoc/asciidoc/model/reviewer_note.rb', line 32

class ReviewerNote < Base
  # Reviewer note attributes
  attribute :reviewer, :string
  attribute :date, :string
  attribute :from, :string
  attribute :to, :string

  # Content can be any AsciiDoc elements (paragraphs, lists, etc.)
  attribute :content,
            Coradoc::AsciiDoc::Model::Base,
            collection: true,
            initialize_empty: true,
            polymorphic: [
              Coradoc::AsciiDoc::Model::TextElement,
              Coradoc::AsciiDoc::Model::Paragraph,
              Coradoc::AsciiDoc::Model::Admonition,
              Coradoc::AsciiDoc::Model::LineBreak,
              Coradoc::AsciiDoc::Model::List::Core
            ]
end

#fromString? (readonly)

Returns Review start indicator.

Returns:

  • (String, nil)

    Review start indicator



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/coradoc/asciidoc/model/reviewer_note.rb', line 32

class ReviewerNote < Base
  # Reviewer note attributes
  attribute :reviewer, :string
  attribute :date, :string
  attribute :from, :string
  attribute :to, :string

  # Content can be any AsciiDoc elements (paragraphs, lists, etc.)
  attribute :content,
            Coradoc::AsciiDoc::Model::Base,
            collection: true,
            initialize_empty: true,
            polymorphic: [
              Coradoc::AsciiDoc::Model::TextElement,
              Coradoc::AsciiDoc::Model::Paragraph,
              Coradoc::AsciiDoc::Model::Admonition,
              Coradoc::AsciiDoc::Model::LineBreak,
              Coradoc::AsciiDoc::Model::List::Core
            ]
end

#reviewerString? (readonly)

Returns Name of the reviewer.

Returns:

  • (String, nil)

    Name of the reviewer



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/coradoc/asciidoc/model/reviewer_note.rb', line 32

class ReviewerNote < Base
  # Reviewer note attributes
  attribute :reviewer, :string
  attribute :date, :string
  attribute :from, :string
  attribute :to, :string

  # Content can be any AsciiDoc elements (paragraphs, lists, etc.)
  attribute :content,
            Coradoc::AsciiDoc::Model::Base,
            collection: true,
            initialize_empty: true,
            polymorphic: [
              Coradoc::AsciiDoc::Model::TextElement,
              Coradoc::AsciiDoc::Model::Paragraph,
              Coradoc::AsciiDoc::Model::Admonition,
              Coradoc::AsciiDoc::Model::LineBreak,
              Coradoc::AsciiDoc::Model::List::Core
            ]
end

#toString? (readonly)

Returns Review end indicator.

Returns:

  • (String, nil)

    Review end indicator



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/coradoc/asciidoc/model/reviewer_note.rb', line 32

class ReviewerNote < Base
  # Reviewer note attributes
  attribute :reviewer, :string
  attribute :date, :string
  attribute :from, :string
  attribute :to, :string

  # Content can be any AsciiDoc elements (paragraphs, lists, etc.)
  attribute :content,
            Coradoc::AsciiDoc::Model::Base,
            collection: true,
            initialize_empty: true,
            polymorphic: [
              Coradoc::AsciiDoc::Model::TextElement,
              Coradoc::AsciiDoc::Model::Paragraph,
              Coradoc::AsciiDoc::Model::Admonition,
              Coradoc::AsciiDoc::Model::LineBreak,
              Coradoc::AsciiDoc::Model::List::Core
            ]
end