Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/soundcloud-plus/functions.rb
Instance Method Summary collapse
- #pluralize ⇒ Object
-
#singular? ⇒ Boolean
Uses active_support/infectors to determine if a string is singular or plural.
- #singularize ⇒ Object
Instance Method Details
#pluralize ⇒ Object
15 16 17 |
# File 'lib/soundcloud-plus/functions.rb', line 15 def pluralize ActiveSupport::Inflector.pluralize(self) end |
#singular? ⇒ Boolean
Uses active_support/infectors to determine if a string is singular or plural
11 12 13 |
# File 'lib/soundcloud-plus/functions.rb', line 11 def singular? self.pluralize != self and self.singularize == self end |
#singularize ⇒ Object
19 20 21 |
# File 'lib/soundcloud-plus/functions.rb', line 19 def singularize ActiveSupport::Inflector.singularize(self) end |