Class: Inflector
- Inherits:
-
Object
- Object
- Inflector
- Defined in:
- lib/redisant/inflector.rb
Class Method Summary collapse
Class Method Details
.constantize(name) ⇒ Object
10 11 12 |
# File 'lib/redisant/inflector.rb', line 10 def self.constantize name Object.const_get name.to_s.capitalize end |
.pluralize(name) ⇒ Object
2 3 4 |
# File 'lib/redisant/inflector.rb', line 2 def self.pluralize name "#{name}s" end |
.singularize(name) ⇒ Object
6 7 8 |
# File 'lib/redisant/inflector.rb', line 6 def self.singularize name name.to_s.chomp("s") end |