italian-ruby 1.3.3 → 1.3.8

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: 2f6505ead6d72fed78f1d4d7c48534491a91a0e536dc7faae5dc804604b9572f
4
- data.tar.gz: a770607fc0744fc593604b33bc4c31431e44aafaf4be80717eea1ad4779e08a1
3
+ metadata.gz: 07e44cdd9eb1eb9565ec95639001866ca3b8fe88166d5c42aa8a2c612adbf65c
4
+ data.tar.gz: '049c8208e602e77d98d73745857b7659f2f6ae091165a0a760a175b8fd2aa3bc'
5
5
  SHA512:
6
- metadata.gz: '03193021e1d62380c0a9b73e9a9c6a2a66963fe207a43ca312fe3598b1e7e7df8d6cde855c8c9724d5d5aaf8b1e633b9eed7f0e662a002e98a63264842f0de4f'
7
- data.tar.gz: 691daf3b737720b0e206acb33ecf71a28aaa9c13a322948cbb0b8550d87281044cfdc34c78d65c94620c6ea3bbab2f8eca77a0a90b71e4ec1728edaff5919bda
6
+ metadata.gz: eab1dde57bc392aa2cb397f8f7b71c63ed97c3522cdd6ef44d3527182877fc7e726aec028549e6900f20ba550f9384adf43b0d7f759fbec411df6274e2c2b587
7
+ data.tar.gz: ce011801fa680a7e5e9c3a9b4b1d5deae5fded18b578a8ac697fad0889f2288c1e7e962588bcd832eee28adf3e1cb80c26f5fbce89cab9bccad96ecc345f66af
@@ -27,6 +27,7 @@ class Hash
27
27
  alias :seleziona! :select!
28
28
  alias :scarta :reject
29
29
  alias :scarta! :reject!
30
+ alias :eccetto :except
30
31
  alias :rimuovi :delete
31
32
  alias :congela :freeze
32
33
  alias :tutti? :all?
@@ -41,6 +42,7 @@ class Hash
41
42
  alias :in_mappa :to_h
42
43
  alias :in_lista :to_a
43
44
  alias :inverti :invert
45
+ alias :ordina :sort
44
46
 
45
47
  alias :specificato? :esiste?
46
48
  alias :specificata? :esiste?
@@ -5,6 +5,8 @@ class NilClass
5
5
  alias :nullo? :nil?
6
6
  alias :nulla? :nil?
7
7
  alias :in_stringa :to_s
8
+ alias :in_intero :to_i
9
+ alias :in_decimale :to_f
8
10
 
9
11
  alias :non_è_nullo? :esiste?
10
12
  alias :non_è_nulla? :esiste?
@@ -31,6 +31,8 @@ class String
31
31
  alias :vuota? :empty?
32
32
  alias :vuoto? :empty?
33
33
  alias :spoglia :strip
34
+ alias :spoglia_a_sinistra :lstrip
35
+ alias :spoglia_a_destra :rstrip
34
36
  alias :mastica :chomp
35
37
  alias :conteggio :count
36
38
  alias :conteggia :count
@@ -65,6 +65,20 @@ class Hash
65
65
  self.select { |key, value| key.in? keys }
66
66
  end
67
67
 
68
+ ##
69
+ # Somma due mappe.
70
+ def +(altra_mappa)
71
+ altra_mappa.each do |chiave, valore|
72
+ if self.has_key? chiave
73
+ valore_sommato = valore + self[chiave]
74
+ self.store chiave, valore_sommato
75
+ else
76
+ self.store chiave, valore
77
+ end
78
+ end
79
+ self
80
+ end
81
+
68
82
  ##
69
83
  # Ritorna una rappresentazione a singolo livello, con notazione ".".
70
84
  def puntifica(*prefissi)
@@ -68,7 +68,7 @@ module Kernel
68
68
  Dir["#{cartella}/**/#{archivio}.ir"]
69
69
  end
70
70
  archivio_da_tradurre = archivi_in_memoria.flatten.compact.first
71
- archivio_da_richiedere = Italian::Ruby.percorso_archivio_tradotto archivio_in_italiano_da_tradurre
71
+ archivio_da_richiedere = Italian::Ruby.percorso_archivio_tradotto archivio_da_tradurre
72
72
  traduci archivio_da_tradurre
73
73
  Object.autoload costante, archivio_da_richiedere
74
74
  end
@@ -1,5 +1,5 @@
1
1
  module Italian
2
2
  module Ruby
3
- VERSIONE = "1.3.3"
3
+ VERSIONE = "1.3.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: italian-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Ballardin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-23 00:00:00.000000000 Z
11
+ date: 2021-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler