immosquare-constants 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immosquare-constants/locale.rb +11 -3
- data/lib/immosquare-constants/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99053deb6406eb95941d69ba204294ac4f4b484a8148ee0815cc1d561773b6a5
|
4
|
+
data.tar.gz: '080de33e8b019779152aaaca5caa4e9aadf33b356c429889100878a3ac17ae3b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63d3b2967a8198ac70acb7c050b16f5d1799a5d3953e449e907d9a29cf06743c40885c5d8059156b1c38136875c3efbde4c6ddc8f5604aad9f718eeab6e30f0f
|
7
|
+
data.tar.gz: c246a527bad454a79b8a613d8be3d46a9c877ba1e454f2e177b0969f7fd9059206378d1248b5cbd5e77efee245a3a9bafbb4e3a9c1823337dc3c315482b62246
|
@@ -199,11 +199,19 @@ module ImmosquareConstants
|
|
199
199
|
|
200
200
|
class << self
|
201
201
|
|
202
|
+
##============================================================##
|
203
|
+
## Renvoie la liste des langues disponibles sans les langues régionales.
|
204
|
+
##============================================================##
|
205
|
+
def languages_with_native_names
|
206
|
+
LOCALES.reject {|key, _value| key.to_s.include?("-") }
|
207
|
+
end
|
208
|
+
|
209
|
+
##============================================================##
|
210
|
+
## Renvoie le nom de la langue correspondant à la locale passée en paramètre.
|
211
|
+
##============================================================##
|
202
212
|
def native_name_for_locale(locale)
|
203
213
|
begin
|
204
|
-
key = locale.to_s.split("-").map.with_index
|
205
|
-
index == 0 ? part.downcase : part.upcase
|
206
|
-
end.join("-").to_sym
|
214
|
+
key = locale.to_s.split("-").map.with_index {|part, index| index == 0 ? part.downcase : part.upcase }.join("-").to_sym
|
207
215
|
LOCALES[key]
|
208
216
|
rescue StandardError
|
209
217
|
nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: immosquare-constants
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- immosquare
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ImmosquareConstants gem provides a robust set of constants to facilitate
|
14
14
|
application development across various domains
|
@@ -43,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '0'
|
45
45
|
requirements: []
|
46
|
-
rubygems_version: 3.5.
|
46
|
+
rubygems_version: 3.5.22
|
47
47
|
signing_key:
|
48
48
|
specification_version: 4
|
49
49
|
summary: ImmosquareConstants is a comprehensive collection of constants useful for
|