immosquare-constants 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d669eacfafcfd0307eafea96d504f2f070849c066dbfe781ba3f41f37814d66b
4
- data.tar.gz: 3cffd5e01d38cc63fe012cccbef7c981729fc2c9b636428dc95c682d5fbcdef2
3
+ metadata.gz: 99053deb6406eb95941d69ba204294ac4f4b484a8148ee0815cc1d561773b6a5
4
+ data.tar.gz: '080de33e8b019779152aaaca5caa4e9aadf33b356c429889100878a3ac17ae3b'
5
5
  SHA512:
6
- metadata.gz: d46d1716505c6bc02c68a004748ce0d3b44bd65573a19b4b1f75c7b676c54b8785a1e96d91182ab407eb4e0f1a4620c6e1fb8fe519320597669425805f598679
7
- data.tar.gz: bbdf4668123d8717065fc45f2694a073e3fe1eff4f6bfcdcf7ec93d84531e4009237216e9f339c722be11035307bec6f50a71cd2f500891ba0e5391d5912de69
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 do |part, 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
@@ -1,3 +1,3 @@
1
1
  module ImmosquareConstants
2
- VERSION = "0.1.9".freeze
2
+ VERSION = "0.1.10".freeze
3
3
  end
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.9
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 00:00:00.000000000 Z
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.21
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