Class: Cmdlet::Inflection::Pluralize
- Inherits:
-
BaseCmdlet
- Object
- BaseCmdlet
- Cmdlet::Inflection::Pluralize
- Defined in:
- lib/cmdlet/inflection/pluralize.rb
Overview
Pluralize: Returns the plural form of the word in the string
Instance Method Summary collapse
-
#call(value) ⇒ String
Value in plural form.
Methods inherited from BaseCmdlet
Instance Method Details
#call(value) ⇒ String
Returns value in plural form.
11 12 13 14 15 16 17 |
# File 'lib/cmdlet/inflection/pluralize.rb', line 11 def call(value) return '' if value.nil? value = value.to_s if value.is_a?(Symbol) value.pluralize end |