in_italiano 0.0.8 → 0.0.9

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: 1f268779065eaa251240df69ff4f9ead3d62e3a9a275acd192f80c5536189623
4
- data.tar.gz: f12571dcffa7367940cf07a540ab3e135c0021c95ff345eb9bb408d3dab8adfd
3
+ metadata.gz: cbbde6d93980828e329b378dfc2b1e7761cb56dc556df43b781ba222fe864132
4
+ data.tar.gz: fbb725c9700100804071ebfc075585079c12330ce8a0f1d9e644579cee8b92c6
5
5
  SHA512:
6
- metadata.gz: 9045279ccfcf93f79669cda99f25d2140e642f4afc70baff6a70c00ca2ad090213f6a72515b013ee484bd1f86794a49e6d803a70747d2edee1f89e2bb828be65
7
- data.tar.gz: 318599a1e221ab81aeb8e0f1ca4d05a9d850baea28586aeae464c4ab102b59395058b7e7b70122ed5ede828441015bd7b4687d79479af10d315ed1d06b0dd92a
6
+ metadata.gz: 42d2a87e88b1d772c51a27b9e5ae198710fab00d00c58f927978cc628a72c0d81694eaf1b40c9a81d2618254113203b674c765e96f97f3eb36ba701ab0854753
7
+ data.tar.gz: 7f8cf56e420209a37b980b1eab5e03c59898106b145759a46d8d310a548367e5b5b19560a750f2fa2685a8b71fbe8b3efd1a5a1511a6ec8c7f9a5df325086299
@@ -0,0 +1,21 @@
1
+ module InItaliano
2
+ module Classes
3
+ module Integer
4
+ module Patch
5
+ # Integer Class Documentation:
6
+ # https://docs.ruby-lang.org/en/3.4/Integer.html
7
+
8
+ def method_missing(symbol, *args)
9
+ if symbol === :in_italiano
10
+ translation = Translations.find(::InItaliano.last_class, ::InItaliano.last_method)
11
+ ::InItaliano.last_class = nil
12
+ ::InItaliano.last_method = nil
13
+ translation
14
+ else
15
+ super(symbol, *args)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -20,6 +20,20 @@ module InItaliano
20
20
  super
21
21
  end
22
22
 
23
+ def b
24
+ ::InItaliano.last_class = :string
25
+ ::InItaliano.last_method = :b
26
+
27
+ super
28
+ end
29
+
30
+ def byteindex(substring, offset = 0)
31
+ ::InItaliano.last_class = :string
32
+ ::InItaliano.last_method = :byteindex
33
+
34
+ super
35
+ end
36
+
23
37
  def bytes
24
38
  ::InItaliano.last_class = :string
25
39
  ::InItaliano.last_method = :bytes
@@ -3,6 +3,8 @@ module InItaliano
3
3
  STRING = {
4
4
  append_as_bytes: "aggiungere come byte",
5
5
  ascii_only?: "solo ascii?",
6
+ b: "b",
7
+ byteindex: "indice dei byte",
6
8
  bytes: "i byte",
7
9
  capitalize: "capitalizzare"
8
10
  }
data/lib/in_italiano.rb CHANGED
@@ -24,14 +24,19 @@ module InItaliano
24
24
  end
25
25
 
26
26
  require 'in_italiano/classes/array/patch'
27
- require 'in_italiano/classes/string/patch'
27
+ require 'in_italiano/classes/integer/patch'
28
28
  require 'in_italiano/classes/string/class_methods_patch'
29
+ require 'in_italiano/classes/string/patch'
29
30
  require 'in_italiano/classes/true_class/patch'
30
31
 
31
32
  class Array
32
33
  prepend InItaliano::Classes::Array::Patch
33
34
  end
34
35
 
36
+ class Integer
37
+ prepend InItaliano::Classes::Integer::Patch
38
+ end
39
+
35
40
  class String
36
41
  extend InItaliano::Classes::String::ClassMethodsPatch
37
42
  prepend InItaliano::Classes::String::Patch
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: in_italiano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - dgonzdev
@@ -16,6 +16,7 @@ extra_rdoc_files: []
16
16
  files:
17
17
  - lib/in_italiano.rb
18
18
  - lib/in_italiano/classes/array/patch.rb
19
+ - lib/in_italiano/classes/integer/patch.rb
19
20
  - lib/in_italiano/classes/string/class_methods_patch.rb
20
21
  - lib/in_italiano/classes/string/patch.rb
21
22
  - lib/in_italiano/classes/true_class/patch.rb