Sha256: ce9299ad8e4ebf79d61b012b7494022952d350d4812e582882c0a27191319174
Contents?: true
Size: 724 Bytes
Versions: 64
Compression:
Stored size: 724 Bytes
Contents
# frozen_string_literal: true require 'active_support/core_ext/module' module Spree module Core module ClassConstantizer class Set include Enumerable def initialize @collection = ::Set.new end def <<(klass) @collection << klass.to_s end def concat(klasses) klasses.each do |klass| self << klass end self end delegate :clear, :empty?, to: :@collection def delete(object) @collection.delete(object.to_s) end def each @collection.each do |klass| yield klass.constantize end end end end end end
Version data entries
64 entries across 64 versions & 1 rubygems