Module: Aliasable::UniversalClassMethods

Defined in:
lib/classy/aliasable.rb

Overview

Methods for both the controlling class/module and the aliased classes.

Instance Method Summary collapse

Instance Method Details

#aliasesObject

Return a hash of known aliases to Class objects.

DANGER DANGER: This is the actual hash used internally by Aliasable, not a dup. If you mess with it, you might asplode things.

ParentClass.aliases                     # => { :pop => ParentClass, :kid => AliasedSubclass, :kid2 => AnotherClass, :chunky_bacon => AnotherClass }
ParentClass.aliases[:thing] = "BOOM"    # This will end in tears.


137
138
139
# File 'lib/classy/aliasable.rb', line 137

def aliases
  send :class_variable_get, :@@classy_aliases
end