italian-ruby 0.9.1 → 0.9.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c3a856d2002d8b8d3fa0811e07aff048ccfa798a69f27089358e7d9b6701868
|
4
|
+
data.tar.gz: 4d39b3cb26f62aca522294610022bcbaaeb4bcf3b8a6fdf950b29541b24a3ebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62ff73f609df6fabf4972d3092e5755b5d2fc494fd332301339bb1d78b2d61721b5d1199eec82148f3798738d3a80561cbff617cc7d940173b80ca86ac393028
|
7
|
+
data.tar.gz: 46981bdd3e24ae83767c28b0f92e5fe30f0e2846105ef9de47f6eea5fed303b9ddedb1a7fb0b18e152cb0e5386e8b0f214abe99b7c4e6ca25f01ea845d5cd5ef
|
@@ -24,8 +24,9 @@ require_relative "core_ext/symbol"
|
|
24
24
|
require_relative "core_ext/numeric"
|
25
25
|
require_relative "core_ext/integer"
|
26
26
|
require_relative "core_ext/float"
|
27
|
+
require_relative "core_ext/rational"
|
27
28
|
require_relative "core_ext/enumerator"
|
28
29
|
require_relative "core_ext/time"
|
29
30
|
require_relative "core_ext/date"
|
30
31
|
|
31
|
-
$VERBOSE = original_verbosity
|
32
|
+
$VERBOSE = original_verbosity
|
@@ -26,6 +26,9 @@ class Date
|
|
26
26
|
alias :in_data :to_date
|
27
27
|
alias :in_tempo :to_time
|
28
28
|
alias :giorno_della_settimana :cwday
|
29
|
+
alias :settimana :cweek
|
30
|
+
alias :mese :month
|
31
|
+
alias :anno :year
|
29
32
|
alias :formatta :strftime
|
30
33
|
|
31
34
|
def due_anni_fa
|
@@ -46,4 +49,4 @@ class Date
|
|
46
49
|
end
|
47
50
|
end
|
48
51
|
|
49
|
-
Data = Date
|
52
|
+
Data = Date
|
@@ -55,6 +55,42 @@ class String
|
|
55
55
|
return unless defined? Date
|
56
56
|
Date.parse self
|
57
57
|
end
|
58
|
+
|
59
|
+
def primi(n)
|
60
|
+
self[0..(n - 1)]
|
61
|
+
end
|
62
|
+
|
63
|
+
def primo_carattere
|
64
|
+
self[0]
|
65
|
+
end
|
66
|
+
|
67
|
+
def ultimo_carattere
|
68
|
+
self[-1]
|
69
|
+
end
|
70
|
+
|
71
|
+
def salta_caratteri(n)
|
72
|
+
self[(n - 1)..-1]
|
73
|
+
end
|
74
|
+
|
75
|
+
def salta_il_primo_carattere
|
76
|
+
self[1..-1]
|
77
|
+
end
|
78
|
+
|
79
|
+
def tronca_caratteri(n)
|
80
|
+
self[0..(-1 - n)]
|
81
|
+
end
|
82
|
+
|
83
|
+
def tronca
|
84
|
+
self[0..-2]
|
85
|
+
end
|
86
|
+
|
87
|
+
def adatta(l)
|
88
|
+
if self.length > l
|
89
|
+
"#{self[0..l - 3]}.."
|
90
|
+
else
|
91
|
+
self.ljust l, " "
|
92
|
+
end
|
93
|
+
end
|
58
94
|
end
|
59
95
|
|
60
96
|
Stringa = String
|
data/lib/italian/ruby/version.rb
CHANGED
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.9.
|
4
|
+
version: 0.9.2
|
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-07-
|
11
|
+
date: 2020-07-14 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/core_ext/open_struct.rb
|
99
99
|
- lib/italian/ruby/core_ext/proc.rb
|
100
100
|
- lib/italian/ruby/core_ext/range.rb
|
101
|
+
- lib/italian/ruby/core_ext/rational.rb
|
101
102
|
- lib/italian/ruby/core_ext/string.rb
|
102
103
|
- lib/italian/ruby/core_ext/symbol.rb
|
103
104
|
- lib/italian/ruby/core_ext/time.rb
|