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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/randomness.rb +8 -0
  3. metadata +4 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cbf520739992b34415e7c3b86029a76124e92435
4
- data.tar.gz: 7ec548c3f945333570a1bf58d25e54e2d1ac4897
3
+ metadata.gz: 2567260fb2de63bdbda8c13722c28739c71dd452
4
+ data.tar.gz: 948588f811445f10d5b0aeb5bba84f6c9d1531cd
5
5
  SHA512:
6
- metadata.gz: f83c02ee960d5f8edbc6bb10583c01a43436dfcf00a88195bc6841d9d817d6844b2197bf21eba1abbeca2dfe3df410b4b4208c9b5ba93c5909e89f426fce7a2a
7
- data.tar.gz: a11765974c359551806f64efd9b8bade3647291153635f4cd2e2f8c1ce0c2702420852827feb43df41a4409da1dd4574a1fd1c4912d552278eb96d996523ccb9
6
+ metadata.gz: ff4366e61468e7a4cf09065aafd891685a0d9fd91618f7dd2354dc52779974f768419bba5cdf6d3c9c47755a76c3ce9661d474583855af7fb6369a56b977290a
7
+ data.tar.gz: 797a4d56af9f54f881aec64f2aa314de08b0e8d54268e12ec121e55b655705ea04b01645a416487484c0f6f6891c7717e583e7ef045fcf7e1f0ae695dbf32f79
@@ -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.0.0
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-07 00:00:00.000000000 Z
11
+ date: 2018-10-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: |-
14
- A gem containing a module that generates random values of many different types. Changes in this version:
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: []