italian-ruby 1.6.1 → 1.6.2
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/metodi/date_time.rb +12 -0
- data/lib/italian/ruby/metodi/integer.rb +17 -0
- data/lib/italian/ruby/metodi.rb +1 -0
- data/lib/italian/ruby/versione.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cae403d93d9024ec704693160708ec4089f7af87c8f4205057a4f09662c479a
|
4
|
+
data.tar.gz: a4aa40571b5b63d9d6804796be6b2c8c8c3399545f954e7a6306b2903b64997f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bfa94933d4c7017992367bd5b06d0ae9e56fb025863edc5713aed6e9c59a7459f83b2042f0838437c1ce18d8523c5d36ca53d76032405a739b3d3a7c9b77c18
|
7
|
+
data.tar.gz: d19444233d85a2fe1605a3821f6bdd2f48fb1df068c6f880b42290f55a80968e588711211c8ac03dcdda8dcbb67c785aec9e6b7047e8ed2e5b52bbdf854860db
|
@@ -42,4 +42,21 @@ class Integer
|
|
42
42
|
Time.now + self
|
43
43
|
end
|
44
44
|
|
45
|
+
##
|
46
|
+
# Restituisce la rappresentazione in byte (unsigned char) del numero intero.
|
47
|
+
def u8
|
48
|
+
raise RangeError, "#{self} out of u8 range" if (self >= 256)
|
49
|
+
self.chr
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# Restituisce la rappresentazione in byte (unsigned short) del numero intero.
|
54
|
+
def u16
|
55
|
+
raise RangeError, "#{self} out of u16 range" if (self >= 65536)
|
56
|
+
return "#{self.u8}#{0.u8}" if self < 256
|
57
|
+
first_byte = self & 0b000000011111111
|
58
|
+
second_byte = self >> 8
|
59
|
+
"#{first_byte.u8}#{second_byte.u8}"
|
60
|
+
end
|
61
|
+
|
45
62
|
end
|
data/lib/italian/ruby/metodi.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: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Ballardin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- lib/italian/ruby/metodi.rb
|
124
124
|
- lib/italian/ruby/metodi/array.rb
|
125
125
|
- lib/italian/ruby/metodi/date.rb
|
126
|
+
- lib/italian/ruby/metodi/date_time.rb
|
126
127
|
- lib/italian/ruby/metodi/false_class.rb
|
127
128
|
- lib/italian/ruby/metodi/hash.rb
|
128
129
|
- lib/italian/ruby/metodi/integer.rb
|
@@ -155,7 +156,7 @@ metadata:
|
|
155
156
|
homepage_uri: https://github.com/Pluvie/italian-ruby
|
156
157
|
source_code_uri: https://github.com/Pluvie/italian-ruby
|
157
158
|
changelog_uri: https://github.com/Pluvie/italian-ruby/CHANGELOG.md
|
158
|
-
post_install_message:
|
159
|
+
post_install_message:
|
159
160
|
rdoc_options: []
|
160
161
|
require_paths:
|
161
162
|
- lib
|
@@ -171,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
172
|
version: '0'
|
172
173
|
requirements: []
|
173
174
|
rubygems_version: 3.2.3
|
174
|
-
signing_key:
|
175
|
+
signing_key:
|
175
176
|
specification_version: 4
|
176
177
|
summary: Program in Ruby writing in Italian.
|
177
178
|
test_files: []
|