ActiveSupport::Dependencies::ClassCache Ruby on Rails 5.1.2 Class ActiveSupport::Dependencies::ClassCache < Object activesupport/lib/active_support/dependencies.rb Methods # [] C clear! E empty? G get K key? N new S safe_get, store Class Public methods new() Link Source: show | on GitHub # File activesupport/lib/active_support/dependencies.rb, line 568 def initialize @store = Concurrent::Map.new end Instance Public methods [](key) Link Alias for: get clear!() Link Source: show | on GitHub # File activesupport/lib/active_support/dependencies.rb, line 598 def clear! @store.clear end empty?() Link Source: show | on GitHub # File activesupport/lib/active_support/dependencies.rb, line 572 def empty? @store.empty? end get(key) Link Also aliased as: [] Source: show | on GitHub # File activesupport/lib/active_support/dependencies.rb, line 580 def get(key) key = key.name if key.respond_to?(:name) @store[key] ||= Inflector.constantize(key) end key?(key) Link Source: show | on GitHub # File activesupport/lib/active_support/dependencies.rb, line 576 def key?(key) @store.key?(key) end safe_get(key) Link Source: show | on GitHub # File activesupport/lib/active_support/dependencies.rb, line 586 def safe_get(key) key = key.name if key.respond_to?(:name) @store[key] ||= Inflector.safe_constantize(key) end store(klass) Link Source: show | on GitHub # File activesupport/lib/active_support/dependencies.rb, line 591 def store(klass) return self unless klass.respond_to?(:name) raise(ArgumentError, "anonymous classes cannot be cached") if klass.name.empty? @store[klass.name] = klass self end