Class: EAAL::Rowset::RowsetBase
- Inherits:
-
Array
- Object
- Array
- EAAL::Rowset::RowsetBase
- Defined in:
- lib/eaal/rowset.rb
Overview
RowsetBase class, all RowSets should be derived from this
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#name ⇒ Object
Returns the value of attribute name.
-
#rowclass ⇒ Object
Returns the value of attribute rowclass.
Instance Method Summary collapse
-
#create_row(xml) ⇒ Object
create a new row in this RowSet.
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
12 13 14 |
# File 'lib/eaal/rowset.rb', line 12 def columns @columns end |
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/eaal/rowset.rb', line 12 def name @name end |
#rowclass ⇒ Object
Returns the value of attribute rowclass.
12 13 14 |
# File 'lib/eaal/rowset.rb', line 12 def rowclass @rowclass end |
Instance Method Details
#create_row(xml) ⇒ Object
create a new row in this RowSet
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/eaal/rowset.rb', line 15 def create_row(xml) row = self.rowclass.new self.columns.each { |colname| row.send(colname +"=", xml[colname]) # row content ignored so far (needs to be added!!!) } if xml.children && xml.containers.length > 0 xml.containers.each { |child| el = EAAL::Result::ResultElement.parse_element(self.rowclass.name, child) row.add_element(el.name, el) } end row end |