Class: Propolize::BaseText

Inherits:
DocumentComponent show all
Defined in:
lib/propolize.rb

Overview

Base text is either a list of list items, or, a paragraph.

Direct Known Subclasses

ItemList, Paragraph

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document.



602
603
604
# File 'lib/propolize.rb', line 602

def document
  @document
end

Instance Method Details

#critiqueClassHtmlObject



612
613
614
615
616
617
618
# File 'lib/propolize.rb', line 612

def critiqueClassHtml
  if @isCritique then 
    return " class=\"critique\"" 
  else
    return ""
  end
end

#writeToDocument(document) ⇒ Object

write to document, by adding to the document as a text item. Depending on the current document state, this will be added to the introduction, or to the explanation of the current proposition, or to the appendix



607
608
609
610
# File 'lib/propolize.rb', line 607

def writeToDocument(document)
  document.addText(self)
  @document = document
end