Module: ReportManager
- Defined in:
- backend/app/model/reports/report_manager.rb
Defined Under Namespace
Modules: Mixin
Constant Summary collapse
- ALLOWED_REPORT_FORMATS =
["json", "csv", "html", "pdf", "rtf"]
Class Method Summary collapse
-
.allowed_report_formats ⇒ Object
-
.register_report(report_class, opts) ⇒ Object
-
.registered_reports ⇒ Object
Class Method Details
.allowed_report_formats ⇒ Object
7 8 9 |
# File 'backend/app/model/reports/report_manager.rb', line 7 def self.allowed_report_formats ALLOWED_REPORT_FORMATS end |
.register_report(report_class, opts) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'backend/app/model/reports/report_manager.rb', line 11 def self.register_report(report_class, opts) opts[:code] = report_class.code opts[:model] = report_class opts[:params] ||= [] Log.warn("Report with code '#{opts[:code]}' already registered") if @@registered_reports.has_key?(opts[:code]) @@registered_reports[opts[:code]] = opts end |
.registered_reports ⇒ Object
22 23 24 |
# File 'backend/app/model/reports/report_manager.rb', line 22 def self.registered_reports @@registered_reports end |