Class: RFilemaker::Row
- Inherits:
-
Hash
- Object
- Hash
- RFilemaker::Row
- Defined in:
- lib/rfilemaker/row.rb
Overview
:nodoc: all
Instance Method Summary collapse
-
#initialize(xml) ⇒ Row
constructor
A new instance of Row.
Constructor Details
#initialize(xml) ⇒ Row
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/rfilemaker/row.rb', line 3 def initialize(xml) self[:record_id] = xml['RECORDID'].to_i self[:mod_id] = xml['MODID'].to_i self[:columns] = xml.css('COL').collect do |col| datas = col.css('DATA') if datas.size > 1 datas.collect { |x| x.inner_text } else datas.inner_text end end end |