Class: Symbol

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 symbol into a class reference.



19
# File 'lib/has_many_polymorphs/support_methods.rb', line 19

def _as_class; self.to_s._as_class; end

#_classifyObject

Changes a symbol into a class name string.



28
# File 'lib/has_many_polymorphs/support_methods.rb', line 28

def _classify; self.to_s.classify; end

#_pluralizeObject

Changes a singular symbol into a plural symbol.



25
# File 'lib/has_many_polymorphs/support_methods.rb', line 25

def _pluralize; self.to_s.pluralize.to_sym; end

#_singularizeObject

Changes a plural symbol into a singular symbol.



22
# File 'lib/has_many_polymorphs/support_methods.rb', line 22

def _singularize; self.to_s.singularize.to_sym; end