Class: TodoBlock
- Inherits:
-
DocItem
- Object
- TextLineBuilderContext
- TextLine
- DocItem
- TodoBlock
- Defined in:
- lib/almirah/doc_items/todo_block.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Attributes inherited from DocItem
Instance Method Summary collapse
-
#initialize(text) ⇒ TodoBlock
constructor
A new instance of TodoBlock.
- #to_html ⇒ Object
Methods inherited from DocItem
Methods inherited from TextLine
add_lazy_doc_id, #bold, #bold_and_italic, #format_string, #italic, #link
Methods inherited from TextLineBuilderContext
#bold, #bold_and_italic, #italic, #link
Constructor Details
#initialize(text) ⇒ TodoBlock
Returns a new instance of TodoBlock.
7 8 9 |
# File 'lib/almirah/doc_items/todo_block.rb', line 7 def initialize(text) @text = text end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
5 6 7 |
# File 'lib/almirah/doc_items/todo_block.rb', line 5 def text @text end |
Instance Method Details
#to_html ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/almirah/doc_items/todo_block.rb', line 11 def to_html s = '' f_text = format_string(@text) if @@html_table_render_in_progress s += "</table>\n" @@html_table_render_in_progress = false end s += "<div class=\"todoblock\"><p>#{f_text}</div>\n" return s end |