string-utility 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/lib/utils.rb +8 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 427e5ac782e47c55afbf7293cc5c7aa6792ab437
4
- data.tar.gz: 970ec310c7cc96a18ea9654efefe7e9e8f2fd8da
3
+ metadata.gz: 83db5676a6b6fa1bdc93eea41ac95a8c1995043b
4
+ data.tar.gz: 04b1559a4fbbeb3cecde296e48595c7c3f6c1fa9
5
5
  SHA512:
6
- metadata.gz: 184ad98ddbb5b332692e613f463f52cad0c0497934e0ea225fe73ff0436f693f45240d6e3593906672fc40eb1e38b95fd261ad5694246cc093c133b3cebed121
7
- data.tar.gz: d863c19c1bb55beb32c6cf03959ea8e684289c46174d566f7625eb507b78b2f5546448b0d556ef252b41d5268c624cde0454ef5d00cfb0a29b143e269b6b9627
6
+ metadata.gz: 3dd6bf662182e34ca50641fc8a9156852ee5b21cee67260e25f80d50715425f1d14aa4383cbc2eb40396ad68c9d6d71d44c330bd30c4f6a5941e925827b3545e
7
+ data.tar.gz: bfb2688ee807a3cfb7c34fa6acccaefcb8a2ad368dede95e84a6641fd1c18efd0b8650704ea1234a626ca137b69e9d10ad1feaae37ae128b9e233cad1af4c781
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
  ## Version 2
3
+ ### Version 2.3.0
4
+ * New spacify method, which is essentially the opposite of underscorify.
5
+
3
6
  ### Version 2.2.0
4
7
  * New underscorify method to replace whitespace with underscores.
5
8
 
data/lib/utils.rb CHANGED
@@ -34,5 +34,13 @@ module StringUtility
34
34
  string = string.gsub(/\s/, '_')
35
35
  string
36
36
  end
37
+
38
+ # Replaces all underscores with whitespace.
39
+ # @return [String] The string with replaced underscores.
40
+ def spacify
41
+ string = self
42
+ string = string.gsub('_', ' ')
43
+ string
44
+ end
37
45
  end
38
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: string-utility
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eli Foster