Class: Class

Inherits:
Object
  • Object
show all
Defined in:
lib/core_ext/class.rb

Instance Method Summary collapse

Instance Method Details

#constantizeClass

Within Metro often times a Class or the name of the class is being used. ActiveSupport provides the constantize on Strings and Symbols but does not provide it on Class. So instead of providing redundant checks in places this monkeypatch simply makes Classes adhere to the same interface.

Returns:



11
12
13
# File 'lib/core_ext/class.rb', line 11

def constantize
  self
end