Class: Facwparser::Element::ListItem
- Inherits:
-
ElementBase
- Object
- ElementBase
- Facwparser::Element::ListItem
- Defined in:
- lib/facwparser/element.rb
Instance Attribute Summary collapse
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#symbols ⇒ Object
readonly
Returns the value of attribute symbols.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from ElementBase
Instance Method Summary collapse
-
#initialize(source, symbols, value) ⇒ ListItem
constructor
A new instance of ListItem.
- #render_html(options) ⇒ Object
Methods inherited from ElementBase
Constructor Details
#initialize(source, symbols, value) ⇒ ListItem
Returns a new instance of ListItem.
98 99 100 101 102 103 |
# File 'lib/facwparser/element.rb', line 98 def initialize(source, symbols, value) super(source) @symbols = symbols @level = symbols.size @value = value end |
Instance Attribute Details
#level ⇒ Object (readonly)
Returns the value of attribute level.
97 98 99 |
# File 'lib/facwparser/element.rb', line 97 def level @level end |
#symbols ⇒ Object (readonly)
Returns the value of attribute symbols.
97 98 99 |
# File 'lib/facwparser/element.rb', line 97 def symbols @symbols end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
97 98 99 |
# File 'lib/facwparser/element.rb', line 97 def value @value end |
Instance Method Details
#render_html(options) ⇒ Object
104 105 106 107 |
# File 'lib/facwparser/element.rb', line 104 def render_html() @children ||= Parser.parse_value value, render_html_by_name_and_children('li', @children, ) end |