Class: Metanorma::Document::Components::Paragraphs::ParagraphBlock

Inherits:
Blocks::BasicBlock
  • Object
show all
Defined in:
lib/metanorma/document/components/paragraphs/paragraph_block.rb

Overview

Default block of textual content.

Instance Method Summary collapse

Instance Method Details

#json_contentObject



139
140
141
142
143
144
145
146
# File 'lib/metanorma/document/components/paragraphs/paragraph_block.rb', line 139

def json_content
  t = text
  if t
    joined = t.is_a?(Array) ? t.join : t
    return joined unless joined.strip.empty?
  end
  ""
end

#json_typeObject



148
149
150
# File 'lib/metanorma/document/components/paragraphs/paragraph_block.rb', line 148

def json_type
  "paragraph"
end