Module: MakeExportableHelper
- Defined in:
- lib/make_exportable/make_exportable_helper.rb
Class Method Summary collapse
- .exportable_class_list ⇒ Object
- .exportable_format_list ⇒ Object
- .exportable_table_list ⇒ Object
- .exportable_units ⇒ Object
Class Method Details
.exportable_class_list ⇒ Object
3 4 5 |
# File 'lib/make_exportable/make_exportable_helper.rb', line 3 def self.exportable_class_list MakeExportable.exportable_classes.keys.sort {|item1, item2| item1[0] <=> item2[0] } end |
.exportable_format_list ⇒ Object
13 14 15 16 17 |
# File 'lib/make_exportable/make_exportable_helper.rb', line 13 def self.exportable_format_list MakeExportable.exportable_formats.map do |key, fmt| [fmt.name, key] end.sort {|item1, item2| item1[0] <=> item2[0] } end |
.exportable_table_list ⇒ Object
7 8 9 10 11 |
# File 'lib/make_exportable/make_exportable_helper.rb', line 7 def self.exportable_table_list MakeExportable.exportable_classes.values.map do |klass| klass.table_name end.sort {|item1, item2| item1[0] <=> item2[0] } end |
.exportable_units ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/make_exportable/make_exportable_helper.rb', line 19 def self.exportable_units hash = {} MakeExportable.exportable_classes.values.map do |klass| hash[klass] = klass.table_name end hash end |