Class: Facwparser::Element::TableHeaders
- Inherits:
-
TableRow
- Object
- ElementBase
- TableRow
- Facwparser::Element::TableHeaders
- Defined in:
- lib/facwparser/element.rb
Instance Attribute Summary collapse
-
#elements ⇒ Object
readonly
Returns the value of attribute elements.
Attributes inherited from ElementBase
Instance Method Summary collapse
-
#initialize(source, value) ⇒ TableHeaders
constructor
A new instance of TableHeaders.
- #render_html(options) ⇒ Object
Methods inherited from ElementBase
Constructor Details
#initialize(source, value) ⇒ TableHeaders
Returns a new instance of TableHeaders.
129 130 131 132 |
# File 'lib/facwparser/element.rb', line 129 def initialize(source, value) super(source) @elements = value[2..-3].split('||') end |
Instance Attribute Details
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
128 129 130 |
# File 'lib/facwparser/element.rb', line 128 def elements @elements end |
Instance Method Details
#render_html(options) ⇒ Object
133 134 135 136 137 |
# File 'lib/facwparser/element.rb', line 133 def render_html() "<tr>" + @elements.map { |e| render_html_by_name_and_children('th', Parser.parse_value(e, ), ) }.join() + "</tr>" end |