Class: String

Inherits:
Object show all
Defined in:
lib/has_many_polymorphs/support_methods.rb

Instance Method Summary collapse

Instance Method Details

#_as_classObject

Changes an underscored string into a class reference.



5
6
7
8
# File 'lib/has_many_polymorphs/support_methods.rb', line 5

def _as_class
  # classify expects self to be plural
  self.classify.constantize
end