Module: CfnDsl::Plurals
- Defined in:
- lib/cfndsl/plurals.rb
Overview
Plural names for lists of content objects
Class Method Summary collapse
Class Method Details
.pluralize(name) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/cfndsl/plurals.rb', line 20 def self.pluralize(name) name = name.to_s return @plurals[name] if @plurals.key?(name) "#{name}s" end |
.singularize(name) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/cfndsl/plurals.rb', line 27 def self.singularize(name) name = name.to_s return @singles[name] if @singles.key?(name) name[0..-2] end |