kaki-utils 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/kaki/utils/nest_loop.rb +1 -1
- data/lib/kaki/utils/retry.rb +1 -1
- data/lib/kaki/utils.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b390abccdce27a6d7204ff963f6493f81dff5bd
|
4
|
+
data.tar.gz: 6e7b9cc43eaaca7f7d9a3a968b754523d5d55260
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bf2fea2203b58f324602841db235e1ab3d4a0f43534c6c8f5c6f09818a78233830865dd491a212545db2fbce01dc0569591a1e066357cc77645f3d72ace0f68
|
7
|
+
data.tar.gz: 9c9db246be6cc8be080464b220215b7f18b34ae7822c9046c5809a9811cd7de6bf5f04bb27a7160573ae5b41a0d75d71591242e95138b2b8e28d17a21308511a
|
data/README.md
CHANGED
@@ -13,6 +13,7 @@ methods
|
|
13
13
|
* Utils.delete\_non\_img(file_name)
|
14
14
|
* Utils.delete\_empty\_folder(folder_name = './')
|
15
15
|
* Utils.bell (only Ubuntu)
|
16
|
+
* Utils.factorial(n)
|
16
17
|
|
17
18
|
## Recurring decimal
|
18
19
|
|
@@ -60,4 +61,4 @@ require "kaki/utils/nest_loop"
|
|
60
61
|
```
|
61
62
|
method
|
62
63
|
|
63
|
-
*
|
64
|
+
* Array#nest\_loop
|
data/lib/kaki/utils/nest_loop.rb
CHANGED
data/lib/kaki/utils/retry.rb
CHANGED
data/lib/kaki/utils.rb
CHANGED
@@ -93,4 +93,14 @@ module Utils
|
|
93
93
|
`paplay /usr/share/sounds/freedesktop/stereo/complete.oga`
|
94
94
|
end
|
95
95
|
module_function :bell
|
96
|
+
|
97
|
+
|
98
|
+
#階乗
|
99
|
+
# @return [Integer]
|
100
|
+
def factorial(n)
|
101
|
+
result = 1
|
102
|
+
2.upto(n) {|i| result *= i}
|
103
|
+
result
|
104
|
+
end
|
105
|
+
module_function :factorial
|
96
106
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaki-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- obelisk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gtk2
|