in_italiano 0.0.1 → 0.0.3

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: 8452943a2bc4e3c74db7243bf5358dcf52d29ebb0ba88ee3fbe92301c73586ab
4
- data.tar.gz: bb348ddc6c9660720a1b25fc7ba7c724a8e59512dbddcf15f2423159d901816f
3
+ metadata.gz: 76ccd429a768aee90037da68e21200594d37209af466dd3febf719277db1316c
4
+ data.tar.gz: ae9d018353e44378bfc4601b120101a3be179e84a02e016677ac2a9567478bea
5
5
  SHA512:
6
- metadata.gz: 9466f924620b93fd17f68b6b37ace782f17119af1086e994252ccd6585f75d7cdaead0a77aa8ac497cea5d3bffcc794bdbc6b4341e98deda3213e123e35183ff
7
- data.tar.gz: c798d31d4563933bf3f077ea783b0768cb3f82203a85d67a4377163e83236abed55519fc5fed209f7133ab25220a70e9a2540278b10525507381eb2aea5de540
6
+ metadata.gz: ddc0555576c8085acecfacce18358e31802f557971fd5b6825dc1c9d4557f7ee3b2f8bcc7f60b5a911971dd88e91e84cf29ee09d7d497dc8ae1d7f247eadeebe
7
+ data.tar.gz: 3de27897e1e3aa34d8db8424876cbd9fdc1a1c3dfed6e417899d26846e62e6ec3a7cce7320902f6c8a3b49727c1820ccedfece42f27cb0380a159c4e498aa486
@@ -0,0 +1,14 @@
1
+ module InItaliano
2
+ module StringTranslations
3
+ def method_missing(symbol, *args)
4
+ if symbol === :in_italiano
5
+ translation = TRANSLATIONS[@@last_class][@@last_method]
6
+ @@last_class = nil
7
+ @@last_method = nil
8
+ translation
9
+ else
10
+ super(symbol, *args)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,25 @@
1
+ module InItaliano
2
+ module Classes
3
+ module String
4
+ module Patch
5
+ def capitalize
6
+ @@last_class = :string
7
+ @@last_method = :capitalize
8
+
9
+ super
10
+ end
11
+
12
+ def method_missing(symbol, *args)
13
+ if symbol === :in_italiano
14
+ translation = TRANSLATIONS[@@last_class][@@last_method]
15
+ @@last_class = nil
16
+ @@last_method = nil
17
+ translation
18
+ else
19
+ super(symbol, *args)
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
data/lib/in_italiano.rb CHANGED
@@ -1,2 +1,16 @@
1
+ require 'in_italiano/classes/string/patch'
2
+
1
3
  module InItaliano
4
+ @@last_class = nil
5
+ @@last_method = nil
6
+
7
+ TRANSLATIONS = {
8
+ string: {
9
+ capitalize: "capitalizzare"
10
+ }
11
+ }
12
+ end
13
+
14
+ class String
15
+ prepend InItaliano::Classes::String::Patch
2
16
  end
metadata CHANGED
@@ -1,26 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: in_italiano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - dgonzdev
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-10-26 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: In Italiano
14
- email:
15
13
  executables: []
16
14
  extensions: []
17
15
  extra_rdoc_files: []
18
16
  files:
19
17
  - lib/in_italiano.rb
18
+ - lib/in_italiano/array_translations.rb
19
+ - lib/in_italiano/classes/string/patch.rb
20
20
  homepage: https://rubygems.org/gems/in_italiano
21
21
  licenses: []
22
22
  metadata: {}
23
- post_install_message:
24
23
  rdoc_options: []
25
24
  require_paths:
26
25
  - lib
@@ -28,15 +27,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
28
27
  requirements:
29
28
  - - ">="
30
29
  - !ruby/object:Gem::Version
31
- version: '0'
30
+ version: '3.4'
32
31
  required_rubygems_version: !ruby/object:Gem::Requirement
33
32
  requirements:
34
33
  - - ">="
35
34
  - !ruby/object:Gem::Version
36
35
  version: '0'
37
36
  requirements: []
38
- rubygems_version: 3.3.26
39
- signing_key:
37
+ rubygems_version: 3.6.9
40
38
  specification_version: 4
41
39
  summary: In Italiano
42
40
  test_files: []