Class: PPZ::AbstractListItemModel
- Inherits:
-
AbstractModel
- Object
- AbstractModel
- PPZ::AbstractListItemModel
- Defined in:
- lib/doc/model/list/item/abstract.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#level ⇒ Object
readonly
Returns the value of attribute level.
Attributes inherited from AbstractModel
#father_model, #index, #left_model, #right_model
Instance Method Summary collapse
-
#initialize(text, level) ⇒ AbstractListItemModel
constructor
A new instance of AbstractListItemModel.
- #to_html ⇒ Object
Methods inherited from AbstractModel
from_line, #transform_inline_element
Constructor Details
#initialize(text, level) ⇒ AbstractListItemModel
Returns a new instance of AbstractListItemModel.
4 5 6 7 8 |
# File 'lib/doc/model/list/item/abstract.rb', line 4 def initialize text, level super() @text = transform_inline_element text @level = level end |
Instance Attribute Details
#level ⇒ Object (readonly)
Returns the value of attribute level.
2 3 4 |
# File 'lib/doc/model/list/item/abstract.rb', line 2 def level @level end |
Instance Method Details
#to_html ⇒ Object
10 11 12 |
# File 'lib/doc/model/list/item/abstract.rb', line 10 def to_html "<li>#{@text}</li>" end |