Module: Suprdate::Utility::CleanConstantName
- Included in:
- Suprdate::Unit
- Defined in:
- lib/suprdate.rb
Overview
Some inflection on the #name of constants.
Instance Method Summary collapse
-
#name_plural ⇒ Object
Same as #name_singular with an āsā added.
-
#name_singular ⇒ Object
Lowercase name without preceding namespace.
-
#to_sym ⇒ Object
Symbol of lowercase name without preceding namespace.
Instance Method Details
#name_plural ⇒ Object
Same as #name_singular with an āsā added.
33 |
# File 'lib/suprdate.rb', line 33 def name_plural() name_singular + 's' end |
#name_singular ⇒ Object
Lowercase name without preceding namespace.
30 |
# File 'lib/suprdate.rb', line 30 def name_singular() name_without_namespace.downcase end |
#to_sym ⇒ Object
Symbol of lowercase name without preceding namespace.
36 |
# File 'lib/suprdate.rb', line 36 def to_sym() name_singular.to_sym end |