random_data 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -1
- data/Manifest.txt +2 -0
- data/lib/random_data/booleans.rb +10 -0
- data/lib/random_data/numbers.rb +13 -0
- data/lib/random_data/version.rb +1 -1
- metadata +3 -1
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -7,10 +7,12 @@ config/hoe.rb
|
|
7
7
|
config/requirements.rb
|
8
8
|
lib/random_data.rb
|
9
9
|
lib/random_data/array_randomizer.rb
|
10
|
+
lib/random_data/booleans.rb
|
10
11
|
lib/random_data/contact_info.rb
|
11
12
|
lib/random_data/dates.rb
|
12
13
|
lib/random_data/locations.rb
|
13
14
|
lib/random_data/names.rb
|
15
|
+
lib/random_data/numbers.rb
|
14
16
|
lib/random_data/text.rb
|
15
17
|
lib/random_data/version.rb
|
16
18
|
log/debug.log
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module RandomData
|
2
|
+
module Numbers
|
3
|
+
#n can be an Integer or a Range. If it is an Integer, it just returns a random
|
4
|
+
#number greater than or equal to 0 and less than n. If it is a Range, it
|
5
|
+
#returns a random number within the range
|
6
|
+
# Examples
|
7
|
+
#
|
8
|
+
#
|
9
|
+
def number(n)
|
10
|
+
n.is_a?(Range) ? n.to_a.rand : rand(n)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/random_data/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: random_data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ""
|
6
6
|
authors:
|
7
7
|
- Mike Subelsky
|
@@ -35,10 +35,12 @@ files:
|
|
35
35
|
- config/requirements.rb
|
36
36
|
- lib/random_data.rb
|
37
37
|
- lib/random_data/array_randomizer.rb
|
38
|
+
- lib/random_data/booleans.rb
|
38
39
|
- lib/random_data/contact_info.rb
|
39
40
|
- lib/random_data/dates.rb
|
40
41
|
- lib/random_data/locations.rb
|
41
42
|
- lib/random_data/names.rb
|
43
|
+
- lib/random_data/numbers.rb
|
42
44
|
- lib/random_data/text.rb
|
43
45
|
- lib/random_data/version.rb
|
44
46
|
- log/debug.log
|