Last active
December 17, 2015 03:59
-
-
Save duelinmarkers/5547247 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RapidFTR | |
module AddOns | |
def self.add_exporter(e) | |
exporters << e | |
end | |
def self.exporters | |
@exporters ||= [] | |
end | |
ExportResult = Struct.new :data, :content_type, :file_ext | |
def self.add_importer i # if you ever invent such a thing | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rapidftr/add_ons' | |
class CPIMSExportTask | |
def export(children) | |
# Code... | |
RapidFTR::AddOns::ExportResult.new the_data, "application/pdf", "pdf" | |
end | |
end | |
RapidFTR::AddOns.add_exporter CPIMSExportTask |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Untested, so likely has mistakes.