italian-ruby 0.4.2 → 0.5.1

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: 315bfdae9318cce316a19c36d7f40150e01ca6f77f8a306f1dcbf8f765f1af8c
4
- data.tar.gz: 3f2bcc14489b435c7ed14508137c75d147df51e7d2c360f67e9f695dcb856a44
3
+ metadata.gz: 1ee3aa7ec2ecef44b615e39a58fcbbd6a71584a45dd58a13464a7564f850b369
4
+ data.tar.gz: f4e1d6bf496ed85d7c7722b22eb20ede722b1fe3585c27d0b007691a87bc8be8
5
5
  SHA512:
6
- metadata.gz: 1e585308df2c475259efcd34375eb9d9e7008df13aa382df1d6e586345e3167ec425b2515ba51ab8f0212e9713370463029978de816f18cc1a549f2aa2e1771a
7
- data.tar.gz: cc2d71ff81b5c9ffb85f3f7f4d479205b37005623a36d4e3f7fc7f54ac5db68a8e924b7940723848ea1e7d99c41ae70921a464600446fb7f3c2a1eac4205ef95
6
+ metadata.gz: 1c04c908e5fe5cc44c0881007d114a38ed5bc5374e27ec464301f2e4a8b4bfb6f477161501aadc4af6a17d198a3da43257664b4db04f08751c3ab7953984da9b
7
+ data.tar.gz: 0a45bd6fd411f7afe51d96b201ccf72f1f39da45521dceea2da8a5ace48354d018abceb9e7bc04a88a8e9ee0045263b4f9e3274eb2b8708ff00c265eff7d4dcb
@@ -62,6 +62,10 @@ class Array
62
62
  alias :togli :pop
63
63
  alias :riduci :inject
64
64
  alias :inietta :inject
65
+ alias :alla_posizione :at
66
+ alias :somma :sum
67
+ alias :rovescia :reverse
68
+ alias :inverti :reverse
65
69
 
66
70
  def esiste?
67
71
  !nil? && !empty?
@@ -97,7 +101,7 @@ class Array
97
101
  def simbolizza
98
102
  self.map do |element|
99
103
  if element.is_a? Hash
100
- element.simbolizza!
104
+ element.simbolizza
101
105
  else
102
106
  element
103
107
  end
@@ -105,7 +109,15 @@ class Array
105
109
  end
106
110
 
107
111
  def mappa_e_rimuovi_duplicati(&block)
108
- self.map(&block).uniq
112
+ self.map.with_index(&block).uniq
113
+ end
114
+
115
+ def mappa_e_compatta(&block)
116
+ self.map.with_index(&block).compact
117
+ end
118
+
119
+ def mappa_e_appiattisci(&block)
120
+ self.map.with_index(&block).flatten
109
121
  end
110
122
 
111
123
  def in_mappa(&block)
@@ -23,11 +23,13 @@ module Hanami
23
23
 
24
24
  class Result
25
25
  alias :riuscito? :successful?
26
+ alias :riuscita? :successful?
26
27
  alias :errore :error
27
28
 
28
29
  def fallito?
29
30
  !successful?
30
31
  end
32
+ alias :fallita? :fallito?
31
33
  end
32
34
 
33
35
  Risultato = Result
@@ -45,6 +45,9 @@ module RSpec
45
45
  alias :di :by
46
46
  alias :da :from
47
47
  end
48
+ class Equal
49
+ alias :o :or
50
+ end
48
51
  class ChangeFromValue
49
52
  alias :a :to
50
53
  end
@@ -124,7 +127,11 @@ end
124
127
 
125
128
  RSpec.configure do |config|
126
129
  RSpec::Matchers.alias_matcher :sia, :be
130
+ RSpec::Matchers.alias_matcher :siano, :be
131
+ RSpec::Matchers.alias_matcher :tutti, :all
132
+ RSpec::Matchers.alias_matcher :tutte, :all
127
133
  RSpec::Matchers.alias_matcher :equivalga_a, :eq
134
+ RSpec::Matchers.alias_matcher :equivalgano_a, :eq
128
135
  RSpec::Matchers.alias_matcher :alzi_errore, :raise_error
129
136
  RSpec::Matchers.alias_matcher :riceva, :receive
130
137
  RSpec::Matchers.alias_matcher :abbia_ricevuto, :have_received
@@ -20,6 +20,7 @@ class Object
20
20
  alias :è_una? :is_a?
21
21
  alias :valuta_in_istanza :instance_eval
22
22
  alias :esegui_in_istanza :instance_exec
23
+ alias :clona :clone
23
24
 
24
25
  def esiste?
25
26
  !nil?
@@ -1,5 +1,5 @@
1
1
  module Italian
2
2
  module Ruby
3
- VERSION = "0.4.2"
3
+ VERSION = "0.5.1"
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: 0.4.2
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Ballardin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-30 00:00:00.000000000 Z
11
+ date: 2020-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby2ruby