Module: LittleWeasel::Modules::Region
- Included in:
- Locale
- Defined in:
- lib/LittleWeasel/modules/region.rb
Overview
Provides methods for normalizing a region for a locale.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.normalize_region(region) ⇒ Object
19 20 21 |
# File 'lib/LittleWeasel/modules/region.rb', line 19 def normalize_region(region) region&.upcase end |
Instance Method Details
#normalize_region(region) ⇒ Object (private)
19 20 21 |
# File 'lib/LittleWeasel/modules/region.rb', line 19 def normalize_region(region) region&.upcase end |
#normalize_region! ⇒ Object
13 14 15 |
# File 'lib/LittleWeasel/modules/region.rb', line 13 def normalize_region! self.region = normalize_region region end |
#region? ⇒ Boolean
9 10 11 |
# File 'lib/LittleWeasel/modules/region.rb', line 9 def region? region.present? end |