Class: Apiwork::Export::Registry
- Defined in:
- lib/apiwork/export/registry.rb
Class Method Summary collapse
Methods inherited from Registry
clear!, delete, exists?, find, find!, keys, store, values
Class Method Details
.register(export_class) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/apiwork/export/registry.rb', line 7 def register(export_class) raise ArgumentError, 'Export must inherit from Apiwork::Export::Base' unless export_class < Base raise ArgumentError, "Export #{export_class} must define an export_name" unless export_class.export_name store[export_class.export_name] = export_class end |