Sha256: e90943da27015e62383d1d3cad408bbd393e225468328e17a35351e9d3c0e7e8
Contents?: true
Size: 500 Bytes
Versions: 18
Compression:
Stored size: 500 Bytes
Contents
# frozen_string_literal: true module Tramway module Collections module Helper def collection_list_by(name:) require name # needed to load class name with collection unless ::Tramway::Collection.descendants.map(&:to_s).include?(name.camelize) raise "There no such collection named #{name.camelize}. Please create class with self method `list` and extended of `Tramway::Collection`" end name.camelize.constantize.list end end end end
Version data entries
18 entries across 18 versions & 1 rubygems