numeric-filesize 1.0.0 → 1.1.0
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/lib/numeric/filesize.rb +12 -12
- data/sig/numeric/filesize.rbs +12 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34dc29e764375011dc8c41e4f57e1c4d3045fe9b68a040643775d436db92b2c5
|
4
|
+
data.tar.gz: 9bcef9efe66552be66ca7db7281487e6c2db5f8ac8c864593a12921fa04466b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bf16f93a50a4c792d4a312b8ad8b92772e0383ca724435bbcf0c2f80ea78e367abb2622327065cbc0df357f80feed3a48eac2b014aa57aa1ca4b6bd49671cf2
|
7
|
+
data.tar.gz: 3301baab76a8331cc4c35a795532e4220985892f7eef6a37c38e6e32c3a9935e2acd0188dbe713927f52fbda99d4107ea86e0b8fa511e874c9217b06923671b7
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/lib/numeric/filesize.rb
CHANGED
@@ -18,7 +18,7 @@ class Numeric
|
|
18
18
|
|
19
19
|
# Returns `self` kilobytes.
|
20
20
|
def to_kb
|
21
|
-
(self / 1000)
|
21
|
+
(self / 1000)
|
22
22
|
end
|
23
23
|
|
24
24
|
# Returns `self` bytes from megabytes.
|
@@ -28,7 +28,7 @@ class Numeric
|
|
28
28
|
|
29
29
|
# Returns `self` megabytes.
|
30
30
|
def to_mb
|
31
|
-
(self / 1000**2)
|
31
|
+
(self / 1000**2)
|
32
32
|
end
|
33
33
|
|
34
34
|
# Returns `self` bytes from gigabytes.
|
@@ -38,7 +38,7 @@ class Numeric
|
|
38
38
|
|
39
39
|
# Returns `self` gigabytes.
|
40
40
|
def to_gb
|
41
|
-
(self / 1000**3)
|
41
|
+
(self / 1000**3)
|
42
42
|
end
|
43
43
|
|
44
44
|
# Returns `self` bytes from terabytes.
|
@@ -48,7 +48,7 @@ class Numeric
|
|
48
48
|
|
49
49
|
# Returns `self` terabytes.
|
50
50
|
def to_tb
|
51
|
-
(self / 1000**4)
|
51
|
+
(self / 1000**4)
|
52
52
|
end
|
53
53
|
|
54
54
|
# Returns `self` bytes from petabytes.
|
@@ -58,7 +58,7 @@ class Numeric
|
|
58
58
|
|
59
59
|
# Returns `self` petabytes.
|
60
60
|
def to_pb
|
61
|
-
(self / 1000**5)
|
61
|
+
(self / 1000**5)
|
62
62
|
end
|
63
63
|
|
64
64
|
# Returns `self` bytes from exabytes.
|
@@ -68,7 +68,7 @@ class Numeric
|
|
68
68
|
|
69
69
|
# Returns `self` exabytes.
|
70
70
|
def to_eb
|
71
|
-
(self / 1000**6)
|
71
|
+
(self / 1000**6)
|
72
72
|
end
|
73
73
|
|
74
74
|
# Returns `self` bytes from kibibytes.
|
@@ -78,7 +78,7 @@ class Numeric
|
|
78
78
|
|
79
79
|
# Returns `self` kibibytes.
|
80
80
|
def to_kib
|
81
|
-
(self / 1024)
|
81
|
+
(self / 1024)
|
82
82
|
end
|
83
83
|
|
84
84
|
# Returns `self` bytes from mebibytes.
|
@@ -88,7 +88,7 @@ class Numeric
|
|
88
88
|
|
89
89
|
# Returns `self` mebibytes.
|
90
90
|
def to_mib
|
91
|
-
(self / 1024**2)
|
91
|
+
(self / 1024**2)
|
92
92
|
end
|
93
93
|
|
94
94
|
# Returns `self` bytes from gibibytes.
|
@@ -98,7 +98,7 @@ class Numeric
|
|
98
98
|
|
99
99
|
# Returns `self` gibibytes.
|
100
100
|
def to_gib
|
101
|
-
(self / 1024**3)
|
101
|
+
(self / 1024**3)
|
102
102
|
end
|
103
103
|
|
104
104
|
# Returns `self` bytes from tebibytes.
|
@@ -108,7 +108,7 @@ class Numeric
|
|
108
108
|
|
109
109
|
# Returns `self` tebibytes.
|
110
110
|
def to_tib
|
111
|
-
(self / 1024**4)
|
111
|
+
(self / 1024**4)
|
112
112
|
end
|
113
113
|
|
114
114
|
# Returns `self` bytes from pebibytes.
|
@@ -118,7 +118,7 @@ class Numeric
|
|
118
118
|
|
119
119
|
# Returns `self` pebibytes.
|
120
120
|
def to_pib
|
121
|
-
(self / 1024**5)
|
121
|
+
(self / 1024**5)
|
122
122
|
end
|
123
123
|
|
124
124
|
# Returns `self` bytes from exbibyte.
|
@@ -128,6 +128,6 @@ class Numeric
|
|
128
128
|
|
129
129
|
# Returns `self` exbibyte.
|
130
130
|
def to_eib
|
131
|
-
(self / 1024**6)
|
131
|
+
(self / 1024**6)
|
132
132
|
end
|
133
133
|
end
|
data/sig/numeric/filesize.rbs
CHANGED
@@ -9,71 +9,71 @@ class Numeric
|
|
9
9
|
def kb: () -> Integer
|
10
10
|
|
11
11
|
# Returns `self` kilobytes.
|
12
|
-
def to_kb: () ->
|
12
|
+
def to_kb: () -> Numeric
|
13
13
|
|
14
14
|
# Returns `self` bytes from megabytes.
|
15
15
|
def mb: () -> Integer
|
16
16
|
|
17
17
|
# Returns `self` megabytes.
|
18
|
-
def to_mb: () ->
|
18
|
+
def to_mb: () -> Numeric
|
19
19
|
|
20
20
|
# Returns `self` bytes from gigabytes.
|
21
21
|
def gb: () -> Integer
|
22
22
|
|
23
23
|
# Returns `self` gigabytes.
|
24
|
-
def to_gb: () ->
|
24
|
+
def to_gb: () -> Numeric
|
25
25
|
|
26
26
|
# Returns `self` bytes from terabytes.
|
27
27
|
def tb: () -> Integer
|
28
28
|
|
29
29
|
# Returns `self` terabytes.
|
30
|
-
def to_tb: () ->
|
30
|
+
def to_tb: () -> Numeric
|
31
31
|
|
32
32
|
# Returns `self` bytes from petabytes.
|
33
33
|
def pb: () -> Integer
|
34
34
|
|
35
35
|
# Returns `self` petabytes.
|
36
|
-
def to_pb: () ->
|
36
|
+
def to_pb: () -> Numeric
|
37
37
|
|
38
38
|
# Returns `self` bytes from exabytes.
|
39
39
|
def eb: () -> Integer
|
40
40
|
|
41
41
|
# Returns `self` exabytes.
|
42
|
-
def to_eb: () ->
|
42
|
+
def to_eb: () -> Numeric
|
43
43
|
|
44
44
|
# Returns `self` bytes from kibibytes.
|
45
45
|
def kib: () -> Integer
|
46
46
|
|
47
47
|
# Returns `self` kibibytes.
|
48
|
-
def to_kib: () ->
|
48
|
+
def to_kib: () -> Numeric
|
49
49
|
|
50
50
|
# Returns `self` bytes from mebibytes.
|
51
51
|
def mib: () -> Integer
|
52
52
|
|
53
53
|
# Returns `self` mebibytes.
|
54
|
-
def to_mib: () ->
|
54
|
+
def to_mib: () -> Numeric
|
55
55
|
|
56
56
|
# Returns `self` bytes from gibibytes.
|
57
57
|
def gib: () -> Integer
|
58
58
|
|
59
59
|
# Returns `self` gibibytes.
|
60
|
-
def to_gib: () ->
|
60
|
+
def to_gib: () -> Numeric
|
61
61
|
|
62
62
|
# Returns `self` bytes from tebibytes.
|
63
63
|
def tib: () -> Integer
|
64
64
|
|
65
65
|
# Returns `self` tebibytes.
|
66
|
-
def to_tib: () ->
|
66
|
+
def to_tib: () -> Numeric
|
67
67
|
|
68
68
|
# Returns `self` bytes from pebibytes.
|
69
69
|
def pib: () -> Integer
|
70
70
|
|
71
71
|
# Returns `self` pebibytes.
|
72
|
-
def to_pib: () ->
|
72
|
+
def to_pib: () -> Numeric
|
73
73
|
|
74
74
|
# Returns `self` bytes from exbibyte.
|
75
75
|
def eib: () -> Integer
|
76
76
|
|
77
77
|
# Returns `self` exbibyte.
|
78
|
-
def to_eib: () ->
|
78
|
+
def to_eib: () -> Numeric
|
79
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numeric-filesize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NNB
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This adds methods to numeric class to returns bytes from filesize and
|
14
14
|
reverse.
|