Sha256: 2b13b47e6b610757d73351817ba5daa0c2a99044c2133c46533c8f90f6a889d3
Contents?: true
Size: 725 Bytes
Versions: 60
Compression:
Stored size: 725 Bytes
Contents
# frozen_string_literal: true require 'active_support/core_ext/module' module Ibrain 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
60 entries across 60 versions & 1 rubygems