Method: Marty::DataExporter.export_obj
- Defined in:
- lib/marty/data_exporter.rb
.export_obj(obj) ⇒ Object
Export a single object to hash – FIXME: inefficient implementation
167 168 169 170 171 172 |
# File 'lib/marty/data_exporter.rb', line 167 def self.export_obj(obj) klass = obj.class headers = export_headers(klass) rec = export_attrs(klass, obj).flatten Hash[headers.zip(rec)] end |