Commit 4dbf8c9d by Ivan Lan

feat: add TalltyImportExport::ExportableForm

parent 557ccd5a
...@@ -12,6 +12,7 @@ module TalltyImportExport ...@@ -12,6 +12,7 @@ module TalltyImportExport
autoload :Common autoload :Common
autoload :Exportable autoload :Exportable
autoload :ExportableForm
autoload :Export autoload :Export
autoload :Importable autoload :Importable
autoload :Import autoload :Import
......
module TalltyImportExport
module ExportableForm
extend ActiveSupport::Concern
include Common
included do |base|
# base.include(Common)
base.const_set('Export', Class.new(TalltyImportExport::ExportForm))
end
module ClassMethods
def export_instance
const_get('Export').new(self)
end
def export_xlsx records, **options
export_instance.export_xlsx(records, **options)
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment