string-utility 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/utils.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7880b3c35d659af05a90be338b24fcaba8120fea
|
4
|
+
data.tar.gz: 4dad1d4406a7da5cedd1a92c81f1daadff07b117
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1e532a1139acf27729507682924604722b6964887bc7014fbb9eb8d4f3c913821dd16df9eb7a92493047cd6e3239a1e128d95fdd3d40e2c4cde5ad45714355c
|
7
|
+
data.tar.gz: c49251f194755f8789342d2b378c354ef99d60050b6fd3ffd265bd25da1860df2d410a7a7bba5c539d8e41fd3348f58113810cce45a598388a06e6e78f784127
|
data/CHANGELOG.md
CHANGED
data/lib/utils.rb
CHANGED
@@ -54,11 +54,15 @@ module StringUtility
|
|
54
54
|
read[rand(read.size)].chomp
|
55
55
|
end
|
56
56
|
|
57
|
+
# Gets a random three-digit hexidecimal web color string.
|
58
|
+
# @return [String] A random hexidecimal.
|
57
59
|
def self.random_color_three
|
58
60
|
string = random_color(0..2)
|
59
61
|
"##{string}"
|
60
62
|
end
|
61
63
|
|
64
|
+
# Gets a random six-digit hexidecimal web color string.
|
65
|
+
# @return [String] See #random_color_three
|
62
66
|
def self.random_color_six
|
63
67
|
string = random_color(0..5)
|
64
68
|
"##{string}"
|