Sha256: bf61bee2e7fc65f12e493e63e225310c91f3ba8931592cd5df5e1a75e6afc819

Contents?: true

Size: 672 Bytes

Versions: 5

Compression:

Stored size: 672 Bytes

Contents

module MakeExportableHelper

  def self.exportable_class_list
    MakeExportable.exportable_classes.keys.sort {|item1, item2| item1[0] <=> item2[0] }
  end

  def self.exportable_table_list
    MakeExportable.exportable_classes.values.map do |klass|
      klass.table_name
    end.sort {|item1, item2| item1[0] <=> item2[0] }
  end

  def self.exportable_format_list
    MakeExportable.exportable_formats.map do |key, fmt|
      [fmt.name, key]
    end.sort {|item1, item2| item1[0] <=> item2[0] }
  end

  def self.exportable_units
    hash = {}
    MakeExportable.exportable_classes.values.map do |klass|
      hash[klass] = klass.table_name
    end
    hash
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
make_exportable-1.1.0 lib/make_exportable/make_exportable_helper.rb
make_exportable-1.0.3 lib/make_exportable/make_exportable_helper.rb
make_exportable-1.0.2 lib/make_exportable/make_exportable_helper.rb
make_exportable-1.0.1 lib/make_exportable/make_exportable_helper.rb
make_exportable-1.0.0 lib/make_exportable/make_exportable_helper.rb