Class: Propolize::ListItem
- Inherits:
-
Object
- Object
- Propolize::ListItem
- Defined in:
- lib/propolize.rb
Overview
A list item (note: this is not a top-level component, rather it is part of an ItemList component)
Instance Attribute Summary collapse
-
#list ⇒ Object
Returns the value of attribute list.
Instance Method Summary collapse
- #document ⇒ Object
-
#initialize(text) ⇒ ListItem
constructor
A new instance of ListItem.
- #to_s ⇒ Object
- #toHtml ⇒ Object
Constructor Details
#initialize(text) ⇒ ListItem
Returns a new instance of ListItem.
625 626 627 628 |
# File 'lib/propolize.rb', line 625 def initialize(text) @text = text @list = nil end |
Instance Attribute Details
#list ⇒ Object
Returns the value of attribute list.
623 624 625 |
# File 'lib/propolize.rb', line 623 def list @list end |
Instance Method Details
#document ⇒ Object
634 635 636 |
# File 'lib/propolize.rb', line 634 def document return list.document end |
#to_s ⇒ Object
630 631 632 |
# File 'lib/propolize.rb', line 630 def to_s return "ListItem: #{@text.inspect}" end |
#toHtml ⇒ Object
638 639 640 |
# File 'lib/propolize.rb', line 638 def toHtml return "<li>#{document.processText(@text)}</li>" end |