Class: Symbol
Instance Method Summary collapse
-
#_as_class ⇒ Object
Changes an underscored symbol into a class reference.
-
#_classify ⇒ Object
Changes a symbol into a class name string.
-
#_pluralize ⇒ Object
Changes a singular symbol into a plural symbol.
-
#_singularize ⇒ Object
Changes a plural symbol into a singular symbol.
Instance Method Details
#_as_class ⇒ Object
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 |
#_classify ⇒ Object
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 |
#_pluralize ⇒ Object
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 |
#_singularize ⇒ Object
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 |