Methods
#
C
E
G
K
N
S
Class Public methods
new()
     # File activesupport/lib/active_support/dependencies.rb, line 540
540:       def initialize
541:         @store = Hash.new
542:       end
Instance Public methods
[](key)

Alias for get

clear!()
     # File activesupport/lib/active_support/dependencies.rb, line 573
573:       def clear!
574:         @store.clear
575:       end
empty?()
     # File activesupport/lib/active_support/dependencies.rb, line 544
544:       def empty?
545:         @store.empty?
546:       end
get(key)
This method is also aliased as []
     # File activesupport/lib/active_support/dependencies.rb, line 552
552:       def get(key)
553:         key = key.name if key.respond_to?(:name)
554:         @store[key] ||= Inflector.constantize(key)
555:       end
key?(key)
     # File activesupport/lib/active_support/dependencies.rb, line 548
548:       def key?(key)
549:         @store.key?(key)
550:       end
safe_get(key)
     # File activesupport/lib/active_support/dependencies.rb, line 558
558:       def safe_get(key)
559:         key = key.name if key.respond_to?(:name)
560:         @store[key] || begin
561:           klass = Inflector.safe_constantize(key)
562:           @store[key] = klass
563:         end
564:       end
store(klass)
     # File activesupport/lib/active_support/dependencies.rb, line 566
566:       def store(klass)
567:         return self unless klass.respond_to?(:name)
568:         raise(ArgumentError, 'anonymous classes cannot be cached') if klass.name.empty?
569:         @store[klass.name] = klass
570:         self
571:       end