[Almirah.Code] : paragraph.rb ¶
1.1 References ¶
| # | | UL | DL | COV | DR |
| SC-AAAB |
Implementa a non-controlled paragraph as a subclass of the DocItem |
SRS-004 |
|
|
|
1.2 Source Code ¶
require_relative 'doc_item'
# <REQ> Implementa a non-controlled paragraph as a subclass of the DocItem >[SRS-004] </REQ>
class Paragraph < DocItem
attr_accessor :text
def initialize(doc, text)
super(doc)
@text = text.strip
end
def getTextWithoutSpaces
@text.split.join('-').downcase
end
def to_html
s = ''
if @@html_table_render_in_progress
s += '</table>'
@@html_table_render_in_progress = false
end
s += "<p>#{format_string(@text)}"
s
end
end