Sha256: d34792c5fb84707c8bfada00099ad12fd180498a95a6874c64efccb804cdac65
Contents?: true
Size: 583 Bytes
Versions: 52
Compression:
Stored size: 583 Bytes
Contents
# This class serves as a basic superclass for tabular data specific exports, # which are organized as tables : a header row and several rows of data. # # This allows to only define the `#fields` method in the subclass and let the # exporter work alone # module Para module Exporter class Table < Para::Exporter::Base def headers fields.map do |field| encode(model.human_attribute_name(field)) end end def row_for(resource) fields.map do |field| encode(resource.send(field)) end end end end end
Version data entries
52 entries across 52 versions & 1 rubygems