italian-ruby 1.2.3 → 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/italian/ruby/alias.rb +1 -0
- data/lib/italian/ruby/alias/array.rb +1 -0
- data/lib/italian/ruby/alias/date.rb +1 -0
- data/lib/italian/ruby/alias/enumerator.rb +5 -0
- data/lib/italian/ruby/alias/file.rb +2 -0
- data/lib/italian/ruby/alias/ractor.rb +16 -0
- data/lib/italian/ruby/alias/string.rb +1 -0
- data/lib/italian/ruby/metodi.rb +1 -0
- data/lib/italian/ruby/metodi/array.rb +11 -0
- data/lib/italian/ruby/metodi/date.rb +12 -0
- data/lib/italian/ruby/metodi/hash.rb +11 -0
- data/lib/italian/ruby/metodi/main.rb +6 -0
- data/lib/italian/ruby/metodi/set.rb +17 -0
- data/lib/italian/ruby/versione.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bed69f65ce97ddca798b585593d266f4981de8cd4cccf385faa5f0755295a4d7
|
4
|
+
data.tar.gz: 5c3e6705c863c6522db2ae12c34174202f7d19afc4274fb230b218df3407796d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9f5b6731fc64251b795d83bc99664fd6e0615d69bfded83ceab3450ccaa3cc90ea7fa453b57d34b37b0da66d8ea8e95325df57289252197e807d0ceda46985d
|
7
|
+
data.tar.gz: 51d138e5d8f08143d873dd1baf3bbdeca4e432840e4aa94a5ffc0fd079c1787e1abc117bcde508e4ca968848a771bab5420c9efdb7ac20d8b2c7d9cbf568e45a
|
data/lib/italian/ruby/alias.rb
CHANGED
@@ -21,6 +21,7 @@ require_relative "alias/object"
|
|
21
21
|
require_relative "alias/open_struct"
|
22
22
|
require_relative "alias/proc"
|
23
23
|
require_relative "alias/process"
|
24
|
+
require_relative "alias/ractor"
|
24
25
|
require_relative "alias/range"
|
25
26
|
require_relative "alias/rational"
|
26
27
|
require_relative "alias/regexp"
|
data/lib/italian/ruby/metodi.rb
CHANGED
@@ -14,6 +14,7 @@ require_relative "metodi/numeric"
|
|
14
14
|
require_relative "metodi/object"
|
15
15
|
require_relative "metodi/open_struct"
|
16
16
|
require_relative "metodi/range"
|
17
|
+
require_relative "metodi/set"
|
17
18
|
require_relative "metodi/socket"
|
18
19
|
require_relative "metodi/string"
|
19
20
|
require_relative "metodi/symbol"
|
@@ -72,6 +72,17 @@ class Array
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
+
##
|
76
|
+
# Congela in profondità la lista.
|
77
|
+
def congela_in_profondità
|
78
|
+
self.each do |element|
|
79
|
+
next unless element.respond_to? :congela_in_profondità
|
80
|
+
element.congela_in_profondità
|
81
|
+
end
|
82
|
+
self.freeze
|
83
|
+
self
|
84
|
+
end
|
85
|
+
|
75
86
|
##
|
76
87
|
# Mappa e rimuove duplicati in un unico metodo.
|
77
88
|
def mappa_e_rimuovi_duplicati(&block)
|
@@ -25,6 +25,18 @@ class Date
|
|
25
25
|
end
|
26
26
|
|
27
27
|
##
|
28
|
+
# Restituisce la data di inizio anno.
|
29
|
+
def inizio_anno
|
30
|
+
Date.new self.year, 1, 1
|
31
|
+
end
|
32
|
+
|
33
|
+
##
|
34
|
+
# Restituisce la data di fine anno.
|
35
|
+
def fine_anno
|
36
|
+
Date.new self.year, 12, 31
|
37
|
+
end
|
38
|
+
|
39
|
+
|
28
40
|
# Formatta la data secondo la rappresentazione passata.
|
29
41
|
def formatta_locale(format)
|
30
42
|
formattazione = strftime format
|
@@ -47,6 +47,17 @@ class Hash
|
|
47
47
|
copy
|
48
48
|
end
|
49
49
|
|
50
|
+
##
|
51
|
+
# Congela in profondità la mappa.
|
52
|
+
def congela_in_profondità
|
53
|
+
self.each do |key, value|
|
54
|
+
next unless value.respond_to? :congela_in_profondità
|
55
|
+
value.congela_in_profondità
|
56
|
+
end
|
57
|
+
self.freeze
|
58
|
+
self
|
59
|
+
end
|
60
|
+
|
50
61
|
##
|
51
62
|
# Espone le chiavi passate in una nuova mappa.
|
52
63
|
def esponi(*keys)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Set
|
4
|
+
|
5
|
+
|
6
|
+
##
|
7
|
+
# Congela in profondità l'insieme.
|
8
|
+
def congela_in_profondità
|
9
|
+
self.each do |element|
|
10
|
+
next unless element.respond_to? :congela_in_profondità
|
11
|
+
element.congela_in_profondità
|
12
|
+
end
|
13
|
+
self.freeze
|
14
|
+
self
|
15
|
+
end
|
16
|
+
|
17
|
+
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.2.
|
4
|
+
version: 1.2.9
|
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-
|
11
|
+
date: 2021-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- lib/italian/ruby/alias/open_struct.rb
|
99
99
|
- lib/italian/ruby/alias/proc.rb
|
100
100
|
- lib/italian/ruby/alias/process.rb
|
101
|
+
- lib/italian/ruby/alias/ractor.rb
|
101
102
|
- lib/italian/ruby/alias/range.rb
|
102
103
|
- lib/italian/ruby/alias/rational.rb
|
103
104
|
- lib/italian/ruby/alias/regexp.rb
|
@@ -125,6 +126,7 @@ files:
|
|
125
126
|
- lib/italian/ruby/metodi/open_struct.rb
|
126
127
|
- lib/italian/ruby/metodi/range.rb
|
127
128
|
- lib/italian/ruby/metodi/rspec.rb
|
129
|
+
- lib/italian/ruby/metodi/set.rb
|
128
130
|
- lib/italian/ruby/metodi/socket.rb
|
129
131
|
- lib/italian/ruby/metodi/string.rb
|
130
132
|
- lib/italian/ruby/metodi/symbol.rb
|