Class: Coradoc::AsciiDoc::Model::Block::Core
- Inherits:
-
Attached
- Object
- Lutaml::Model::Serializable
- Coradoc::AsciiDoc::Model::Base
- Attached
- Coradoc::AsciiDoc::Model::Block::Core
- Includes:
- Anchorable
- Defined in:
- lib/coradoc/asciidoc/model/block/core.rb
Overview
Base class for block elements in AsciiDoc documents.
Block elements are delimited content sections that can contain multiple lines, titles, attributes, and attached blocks.
Specific block types (Literal, Example, Listing, Quote, etc.) inherit from this class and define their delimiter characters.
Direct Known Subclasses
Example, Listing, Literal, Open, Pass, Quote, ReviewerComment, Side, SourceCode
Instance Attribute Summary collapse
-
#attributes ⇒ Coradoc::AsciiDoc::Model::AttributeList
readonly
Block attributes.
-
#delimiter ⇒ String?
readonly
Full delimiter string.
-
#delimiter_char ⇒ String?
readonly
Delimiter character (e.g., “=”, “-”, “*”, “_”, “+”).
-
#delimiter_len ⇒ Integer?
readonly
Delimiter length (number of repeated characters).
-
#id ⇒ String?
readonly
Optional identifier for the block.
-
#lang ⇒ String?
readonly
Language identifier for syntax highlighting.
-
#lines ⇒ Array<Lutaml::Model::Type::String, Coradoc::AsciiDoc::Model::TextElement>
Block content lines.
-
#title ⇒ Object
Override title and lines setters to accept polymorphic content without coercion.
-
#type_str ⇒ String?
readonly
Block type string.
Instance Method Summary collapse
-
#gen_attributes ⇒ String
Generate the attributes string for this block.
-
#gen_delimiter ⇒ String
Generate the delimiter string for this block.
-
#gen_lines ⇒ String
Generate the lines content for this block.
-
#gen_title ⇒ String
Generate the title string for this block.
-
#initialize(**attributes) ⇒ Core
constructor
A new instance of Core.
Methods included from Anchorable
#default_anchor, #gen_anchor, included
Methods inherited from Attached
Methods inherited from Coradoc::AsciiDoc::Model::Base
#block_level?, #inline?, #serialize_content, #simplify_block_content, #to_adoc, #to_h, visit, #visit
Constructor Details
#initialize(**attributes) ⇒ Core
Returns a new instance of Core.
85 86 87 88 89 90 91 92 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 85 def initialize(**attributes) # Extract title and lines before super to avoid coercion title_value = attributes.delete(:title) lines_value = attributes.delete(:lines) super self.title = title_value if title_value self.lines = lines_value if lines_value end |
Instance Attribute Details
#attributes ⇒ Coradoc::AsciiDoc::Model::AttributeList (readonly)
Returns Block attributes.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 53 class Core < Attached include Coradoc::AsciiDoc::Model::Anchorable attribute :id, :string attribute :title, :string, default: -> { nil } # Polymorphic: string or array of Model objects attribute :attributes, Coradoc::AsciiDoc::Model::AttributeList, default: lambda { Coradoc::AsciiDoc::Model::AttributeList.new } attribute :lines, Lutaml::Model::Serializable, collection: true, initialize_empty: true, polymorphic: [ Lutaml::Model::Type::String, Coradoc::AsciiDoc::Model::TextElement ] attribute :delimiter, :string attribute :delimiter_char, :string attribute :delimiter_len, :integer attribute :lang, :string attribute :type_str, :string # Override title and lines setters to accept polymorphic content without coercion attr_accessor :title attr_writer :lines def lines @lines || [] end def initialize(**attributes) # Extract title and lines before super to avoid coercion title_value = attributes.delete(:title) lines_value = attributes.delete(:lines) super self.title = title_value if title_value self.lines = lines_value if lines_value end # NOTE: This module provides core block functionality. # Additional methods may be added as needed for specific block types. # Generate the title string for this block # # @return [String] The formatted title (e.g., ".Title\n") def gen_title t = serialize_content(title) return '' if t.nil? || t.empty? ".#{t}\n" end # Generate the attributes string for this block # # @return [String] The formatted attributes def gen_attributes attrs = attributes.to_adoc(show_empty: false) return "#{attrs}\n" unless attrs.empty? '' end # Generate the delimiter string for this block # # @return [String] The delimiter (e.g., "----", "====") # @return [String] Empty string if delimiter_char or delimiter_len is nil def gen_delimiter return '' if delimiter_char.nil? || delimiter_len.nil? delimiter_char * delimiter_len end # Generate the lines content for this block # # @return [String] The serialized lines def gen_lines lines.map do |line| serialize_content(line) end.join end end |
#delimiter ⇒ String? (readonly)
Returns Full delimiter string.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 53 class Core < Attached include Coradoc::AsciiDoc::Model::Anchorable attribute :id, :string attribute :title, :string, default: -> { nil } # Polymorphic: string or array of Model objects attribute :attributes, Coradoc::AsciiDoc::Model::AttributeList, default: lambda { Coradoc::AsciiDoc::Model::AttributeList.new } attribute :lines, Lutaml::Model::Serializable, collection: true, initialize_empty: true, polymorphic: [ Lutaml::Model::Type::String, Coradoc::AsciiDoc::Model::TextElement ] attribute :delimiter, :string attribute :delimiter_char, :string attribute :delimiter_len, :integer attribute :lang, :string attribute :type_str, :string # Override title and lines setters to accept polymorphic content without coercion attr_accessor :title attr_writer :lines def lines @lines || [] end def initialize(**attributes) # Extract title and lines before super to avoid coercion title_value = attributes.delete(:title) lines_value = attributes.delete(:lines) super self.title = title_value if title_value self.lines = lines_value if lines_value end # NOTE: This module provides core block functionality. # Additional methods may be added as needed for specific block types. # Generate the title string for this block # # @return [String] The formatted title (e.g., ".Title\n") def gen_title t = serialize_content(title) return '' if t.nil? || t.empty? ".#{t}\n" end # Generate the attributes string for this block # # @return [String] The formatted attributes def gen_attributes attrs = attributes.to_adoc(show_empty: false) return "#{attrs}\n" unless attrs.empty? '' end # Generate the delimiter string for this block # # @return [String] The delimiter (e.g., "----", "====") # @return [String] Empty string if delimiter_char or delimiter_len is nil def gen_delimiter return '' if delimiter_char.nil? || delimiter_len.nil? delimiter_char * delimiter_len end # Generate the lines content for this block # # @return [String] The serialized lines def gen_lines lines.map do |line| serialize_content(line) end.join end end |
#delimiter_char ⇒ String? (readonly)
Returns Delimiter character (e.g., “=”, “-”, “*”, “_”, “+”).
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 53 class Core < Attached include Coradoc::AsciiDoc::Model::Anchorable attribute :id, :string attribute :title, :string, default: -> { nil } # Polymorphic: string or array of Model objects attribute :attributes, Coradoc::AsciiDoc::Model::AttributeList, default: lambda { Coradoc::AsciiDoc::Model::AttributeList.new } attribute :lines, Lutaml::Model::Serializable, collection: true, initialize_empty: true, polymorphic: [ Lutaml::Model::Type::String, Coradoc::AsciiDoc::Model::TextElement ] attribute :delimiter, :string attribute :delimiter_char, :string attribute :delimiter_len, :integer attribute :lang, :string attribute :type_str, :string # Override title and lines setters to accept polymorphic content without coercion attr_accessor :title attr_writer :lines def lines @lines || [] end def initialize(**attributes) # Extract title and lines before super to avoid coercion title_value = attributes.delete(:title) lines_value = attributes.delete(:lines) super self.title = title_value if title_value self.lines = lines_value if lines_value end # NOTE: This module provides core block functionality. # Additional methods may be added as needed for specific block types. # Generate the title string for this block # # @return [String] The formatted title (e.g., ".Title\n") def gen_title t = serialize_content(title) return '' if t.nil? || t.empty? ".#{t}\n" end # Generate the attributes string for this block # # @return [String] The formatted attributes def gen_attributes attrs = attributes.to_adoc(show_empty: false) return "#{attrs}\n" unless attrs.empty? '' end # Generate the delimiter string for this block # # @return [String] The delimiter (e.g., "----", "====") # @return [String] Empty string if delimiter_char or delimiter_len is nil def gen_delimiter return '' if delimiter_char.nil? || delimiter_len.nil? delimiter_char * delimiter_len end # Generate the lines content for this block # # @return [String] The serialized lines def gen_lines lines.map do |line| serialize_content(line) end.join end end |
#delimiter_len ⇒ Integer? (readonly)
Returns Delimiter length (number of repeated characters).
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 53 class Core < Attached include Coradoc::AsciiDoc::Model::Anchorable attribute :id, :string attribute :title, :string, default: -> { nil } # Polymorphic: string or array of Model objects attribute :attributes, Coradoc::AsciiDoc::Model::AttributeList, default: lambda { Coradoc::AsciiDoc::Model::AttributeList.new } attribute :lines, Lutaml::Model::Serializable, collection: true, initialize_empty: true, polymorphic: [ Lutaml::Model::Type::String, Coradoc::AsciiDoc::Model::TextElement ] attribute :delimiter, :string attribute :delimiter_char, :string attribute :delimiter_len, :integer attribute :lang, :string attribute :type_str, :string # Override title and lines setters to accept polymorphic content without coercion attr_accessor :title attr_writer :lines def lines @lines || [] end def initialize(**attributes) # Extract title and lines before super to avoid coercion title_value = attributes.delete(:title) lines_value = attributes.delete(:lines) super self.title = title_value if title_value self.lines = lines_value if lines_value end # NOTE: This module provides core block functionality. # Additional methods may be added as needed for specific block types. # Generate the title string for this block # # @return [String] The formatted title (e.g., ".Title\n") def gen_title t = serialize_content(title) return '' if t.nil? || t.empty? ".#{t}\n" end # Generate the attributes string for this block # # @return [String] The formatted attributes def gen_attributes attrs = attributes.to_adoc(show_empty: false) return "#{attrs}\n" unless attrs.empty? '' end # Generate the delimiter string for this block # # @return [String] The delimiter (e.g., "----", "====") # @return [String] Empty string if delimiter_char or delimiter_len is nil def gen_delimiter return '' if delimiter_char.nil? || delimiter_len.nil? delimiter_char * delimiter_len end # Generate the lines content for this block # # @return [String] The serialized lines def gen_lines lines.map do |line| serialize_content(line) end.join end end |
#id ⇒ String? (readonly)
Returns Optional identifier for the block.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 53 class Core < Attached include Coradoc::AsciiDoc::Model::Anchorable attribute :id, :string attribute :title, :string, default: -> { nil } # Polymorphic: string or array of Model objects attribute :attributes, Coradoc::AsciiDoc::Model::AttributeList, default: lambda { Coradoc::AsciiDoc::Model::AttributeList.new } attribute :lines, Lutaml::Model::Serializable, collection: true, initialize_empty: true, polymorphic: [ Lutaml::Model::Type::String, Coradoc::AsciiDoc::Model::TextElement ] attribute :delimiter, :string attribute :delimiter_char, :string attribute :delimiter_len, :integer attribute :lang, :string attribute :type_str, :string # Override title and lines setters to accept polymorphic content without coercion attr_accessor :title attr_writer :lines def lines @lines || [] end def initialize(**attributes) # Extract title and lines before super to avoid coercion title_value = attributes.delete(:title) lines_value = attributes.delete(:lines) super self.title = title_value if title_value self.lines = lines_value if lines_value end # NOTE: This module provides core block functionality. # Additional methods may be added as needed for specific block types. # Generate the title string for this block # # @return [String] The formatted title (e.g., ".Title\n") def gen_title t = serialize_content(title) return '' if t.nil? || t.empty? ".#{t}\n" end # Generate the attributes string for this block # # @return [String] The formatted attributes def gen_attributes attrs = attributes.to_adoc(show_empty: false) return "#{attrs}\n" unless attrs.empty? '' end # Generate the delimiter string for this block # # @return [String] The delimiter (e.g., "----", "====") # @return [String] Empty string if delimiter_char or delimiter_len is nil def gen_delimiter return '' if delimiter_char.nil? || delimiter_len.nil? delimiter_char * delimiter_len end # Generate the lines content for this block # # @return [String] The serialized lines def gen_lines lines.map do |line| serialize_content(line) end.join end end |
#lang ⇒ String? (readonly)
Returns Language identifier for syntax highlighting.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 53 class Core < Attached include Coradoc::AsciiDoc::Model::Anchorable attribute :id, :string attribute :title, :string, default: -> { nil } # Polymorphic: string or array of Model objects attribute :attributes, Coradoc::AsciiDoc::Model::AttributeList, default: lambda { Coradoc::AsciiDoc::Model::AttributeList.new } attribute :lines, Lutaml::Model::Serializable, collection: true, initialize_empty: true, polymorphic: [ Lutaml::Model::Type::String, Coradoc::AsciiDoc::Model::TextElement ] attribute :delimiter, :string attribute :delimiter_char, :string attribute :delimiter_len, :integer attribute :lang, :string attribute :type_str, :string # Override title and lines setters to accept polymorphic content without coercion attr_accessor :title attr_writer :lines def lines @lines || [] end def initialize(**attributes) # Extract title and lines before super to avoid coercion title_value = attributes.delete(:title) lines_value = attributes.delete(:lines) super self.title = title_value if title_value self.lines = lines_value if lines_value end # NOTE: This module provides core block functionality. # Additional methods may be added as needed for specific block types. # Generate the title string for this block # # @return [String] The formatted title (e.g., ".Title\n") def gen_title t = serialize_content(title) return '' if t.nil? || t.empty? ".#{t}\n" end # Generate the attributes string for this block # # @return [String] The formatted attributes def gen_attributes attrs = attributes.to_adoc(show_empty: false) return "#{attrs}\n" unless attrs.empty? '' end # Generate the delimiter string for this block # # @return [String] The delimiter (e.g., "----", "====") # @return [String] Empty string if delimiter_char or delimiter_len is nil def gen_delimiter return '' if delimiter_char.nil? || delimiter_len.nil? delimiter_char * delimiter_len end # Generate the lines content for this block # # @return [String] The serialized lines def gen_lines lines.map do |line| serialize_content(line) end.join end end |
#lines ⇒ Array<Lutaml::Model::Type::String, Coradoc::AsciiDoc::Model::TextElement>
Returns Block content lines.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 53 class Core < Attached include Coradoc::AsciiDoc::Model::Anchorable attribute :id, :string attribute :title, :string, default: -> { nil } # Polymorphic: string or array of Model objects attribute :attributes, Coradoc::AsciiDoc::Model::AttributeList, default: lambda { Coradoc::AsciiDoc::Model::AttributeList.new } attribute :lines, Lutaml::Model::Serializable, collection: true, initialize_empty: true, polymorphic: [ Lutaml::Model::Type::String, Coradoc::AsciiDoc::Model::TextElement ] attribute :delimiter, :string attribute :delimiter_char, :string attribute :delimiter_len, :integer attribute :lang, :string attribute :type_str, :string # Override title and lines setters to accept polymorphic content without coercion attr_accessor :title attr_writer :lines def lines @lines || [] end def initialize(**attributes) # Extract title and lines before super to avoid coercion title_value = attributes.delete(:title) lines_value = attributes.delete(:lines) super self.title = title_value if title_value self.lines = lines_value if lines_value end # NOTE: This module provides core block functionality. # Additional methods may be added as needed for specific block types. # Generate the title string for this block # # @return [String] The formatted title (e.g., ".Title\n") def gen_title t = serialize_content(title) return '' if t.nil? || t.empty? ".#{t}\n" end # Generate the attributes string for this block # # @return [String] The formatted attributes def gen_attributes attrs = attributes.to_adoc(show_empty: false) return "#{attrs}\n" unless attrs.empty? '' end # Generate the delimiter string for this block # # @return [String] The delimiter (e.g., "----", "====") # @return [String] Empty string if delimiter_char or delimiter_len is nil def gen_delimiter return '' if delimiter_char.nil? || delimiter_len.nil? delimiter_char * delimiter_len end # Generate the lines content for this block # # @return [String] The serialized lines def gen_lines lines.map do |line| serialize_content(line) end.join end end |
#title ⇒ Object
Override title and lines setters to accept polymorphic content without coercion
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 53 class Core < Attached include Coradoc::AsciiDoc::Model::Anchorable attribute :id, :string attribute :title, :string, default: -> { nil } # Polymorphic: string or array of Model objects attribute :attributes, Coradoc::AsciiDoc::Model::AttributeList, default: lambda { Coradoc::AsciiDoc::Model::AttributeList.new } attribute :lines, Lutaml::Model::Serializable, collection: true, initialize_empty: true, polymorphic: [ Lutaml::Model::Type::String, Coradoc::AsciiDoc::Model::TextElement ] attribute :delimiter, :string attribute :delimiter_char, :string attribute :delimiter_len, :integer attribute :lang, :string attribute :type_str, :string # Override title and lines setters to accept polymorphic content without coercion attr_accessor :title attr_writer :lines def lines @lines || [] end def initialize(**attributes) # Extract title and lines before super to avoid coercion title_value = attributes.delete(:title) lines_value = attributes.delete(:lines) super self.title = title_value if title_value self.lines = lines_value if lines_value end # NOTE: This module provides core block functionality. # Additional methods may be added as needed for specific block types. # Generate the title string for this block # # @return [String] The formatted title (e.g., ".Title\n") def gen_title t = serialize_content(title) return '' if t.nil? || t.empty? ".#{t}\n" end # Generate the attributes string for this block # # @return [String] The formatted attributes def gen_attributes attrs = attributes.to_adoc(show_empty: false) return "#{attrs}\n" unless attrs.empty? '' end # Generate the delimiter string for this block # # @return [String] The delimiter (e.g., "----", "====") # @return [String] Empty string if delimiter_char or delimiter_len is nil def gen_delimiter return '' if delimiter_char.nil? || delimiter_len.nil? delimiter_char * delimiter_len end # Generate the lines content for this block # # @return [String] The serialized lines def gen_lines lines.map do |line| serialize_content(line) end.join end end |
#type_str ⇒ String? (readonly)
Returns Block type string.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 53 class Core < Attached include Coradoc::AsciiDoc::Model::Anchorable attribute :id, :string attribute :title, :string, default: -> { nil } # Polymorphic: string or array of Model objects attribute :attributes, Coradoc::AsciiDoc::Model::AttributeList, default: lambda { Coradoc::AsciiDoc::Model::AttributeList.new } attribute :lines, Lutaml::Model::Serializable, collection: true, initialize_empty: true, polymorphic: [ Lutaml::Model::Type::String, Coradoc::AsciiDoc::Model::TextElement ] attribute :delimiter, :string attribute :delimiter_char, :string attribute :delimiter_len, :integer attribute :lang, :string attribute :type_str, :string # Override title and lines setters to accept polymorphic content without coercion attr_accessor :title attr_writer :lines def lines @lines || [] end def initialize(**attributes) # Extract title and lines before super to avoid coercion title_value = attributes.delete(:title) lines_value = attributes.delete(:lines) super self.title = title_value if title_value self.lines = lines_value if lines_value end # NOTE: This module provides core block functionality. # Additional methods may be added as needed for specific block types. # Generate the title string for this block # # @return [String] The formatted title (e.g., ".Title\n") def gen_title t = serialize_content(title) return '' if t.nil? || t.empty? ".#{t}\n" end # Generate the attributes string for this block # # @return [String] The formatted attributes def gen_attributes attrs = attributes.to_adoc(show_empty: false) return "#{attrs}\n" unless attrs.empty? '' end # Generate the delimiter string for this block # # @return [String] The delimiter (e.g., "----", "====") # @return [String] Empty string if delimiter_char or delimiter_len is nil def gen_delimiter return '' if delimiter_char.nil? || delimiter_len.nil? delimiter_char * delimiter_len end # Generate the lines content for this block # # @return [String] The serialized lines def gen_lines lines.map do |line| serialize_content(line) end.join end end |
Instance Method Details
#gen_attributes ⇒ String
Generate the attributes string for this block
110 111 112 113 114 115 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 110 def gen_attributes attrs = attributes.to_adoc(show_empty: false) return "#{attrs}\n" unless attrs.empty? '' end |
#gen_delimiter ⇒ String
Generate the delimiter string for this block
121 122 123 124 125 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 121 def gen_delimiter return '' if delimiter_char.nil? || delimiter_len.nil? delimiter_char * delimiter_len end |
#gen_lines ⇒ String
Generate the lines content for this block
130 131 132 133 134 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 130 def gen_lines lines.map do |line| serialize_content(line) end.join end |
#gen_title ⇒ String
Generate the title string for this block
100 101 102 103 104 105 |
# File 'lib/coradoc/asciidoc/model/block/core.rb', line 100 def gen_title t = serialize_content(title) return '' if t.nil? || t.empty? ".#{t}\n" end |