whimsy_str 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1007c18e93f374c7f55721290cee57cf80efff09dc0874a77253c8a607418584
4
- data.tar.gz: 726737088736c96d840e26bf17581bb376af97a9d4f808353eb109871c3328fd
3
+ metadata.gz: c80b6d1cf99be169fdffef91f1339d9110313fcabd2f94a0ab4e6b6a2a41c259
4
+ data.tar.gz: aa23d92f2469bac20734cefc07ccb6c712201abfdf4bae3dabd0f76bd397e0e2
5
5
  SHA512:
6
- metadata.gz: 49725d1c482c7c1cf31c2f7dff8cf36b8dc34a9bc9334ee6bb26471daeac208c3738596364614ff743dd16f479f5e5dcae2fa9298342b354706cbc9dd298c735
7
- data.tar.gz: 8ab461aba6c32865749c8bf9af834d56718510d8fd25a446c81b2369bc3d5f71db266a03ff61cd4e29aedfead1330b1d3d541da9a35d0102ac079bb310e2bbcc
6
+ metadata.gz: 5aca6b228f423e74c633e1118ad0389357f9ab2d1f2c35d2cc6a32fd2f47f05681a8d7ab0c872e5662c4478b65ffa10be366a17761abc325aacddfa2d87852a9
7
+ data.tar.gz: f2b1183c8f7fb5706c998c8817c038548f26e406baff7527620ecaf901669d6531e209b24782687183461c1403070383217ea047b87b4fb93fd16523ffa41214
@@ -13,9 +13,10 @@ module WhimsyStr
13
13
  # @return [String] - a modified string in the style of the Spongbob 'mocking
14
14
  # text' meme format.
15
15
  def spongify(chance_of_upcase = 0.5)
16
+ chance_of_upcase = Float(chance_of_upcase)
16
17
  return self unless chance_of_upcase.positive?
17
18
 
18
- random = Random.new(Float(chance_of_upcase))
19
+ random = Random.new(chance_of_upcase)
19
20
  chars.map.with_index do |char, index|
20
21
  will_upcase = if block_given?
21
22
  yield char, index
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
@@ -8,9 +8,10 @@ module WhimsyStr
8
8
  # character of the original string.
9
9
  # @return [String] - a modified string in the 'vaporwave' aesthetic.
10
10
  def wavify(num_spaces = 1)
11
+ num_spaces = Integer(num_spaces)
11
12
  return self unless num_spaces.positive?
12
13
 
13
- chars.join(' ' * Integer(num_spaces))
14
+ chars.join(' ' * num_spaces)
14
15
  end
15
16
  end
16
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whimsy_str
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Von Wolfe