randomness 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/lib/randomness.rb +8 -0
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2567260fb2de63bdbda8c13722c28739c71dd452
|
4
|
+
data.tar.gz: 948588f811445f10d5b0aeb5bba84f6c9d1531cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff4366e61468e7a4cf09065aafd891685a0d9fd91618f7dd2354dc52779974f768419bba5cdf6d3c9c47755a76c3ce9661d474583855af7fb6369a56b977290a
|
7
|
+
data.tar.gz: 797a4d56af9f54f881aec64f2aa314de08b0e8d54268e12ec121e55b655705ea04b01645a416487484c0f6f6891c7717e583e7ef045fcf7e1f0ae695dbf32f79
|
data/lib/randomness.rb
CHANGED
@@ -107,8 +107,16 @@ module Randomness
|
|
107
107
|
def shufflearray(array)
|
108
108
|
return array.shuffle()
|
109
109
|
end
|
110
|
+
#Shuffles the array.
|
111
|
+
def shufflearray!(array)
|
112
|
+
array.shuffle!()
|
113
|
+
end
|
110
114
|
#Shuffles the key-value mapping in the given hash and returns the result.
|
111
115
|
def shufflehash(hash)
|
112
116
|
return hash.values().shuffle()
|
113
117
|
end
|
118
|
+
#Shuffles the key-value mapping in the given hash.
|
119
|
+
def shufflehash!(hash)
|
120
|
+
hash.values().shuffle!()
|
121
|
+
end
|
114
122
|
end
|
metadata
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: randomness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SugarRush
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
14
|
-
|
15
|
-
Now this gem is required using 'randomness' instead of 'main'.
|
13
|
+
description: A gem containing a module that generates random values of many different
|
14
|
+
types.
|
16
15
|
email:
|
17
16
|
executables: []
|
18
17
|
extensions: []
|