to_bool_extension 0.0.1 → 0.0.3

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: 0d382bbf883300d96f662ccb7d7c045554157ec2979c703a69708cf86baaf971
4
- data.tar.gz: e95926737f129efc188cf97e5305660af754f5e452278187ea74f81fb003aa90
3
+ metadata.gz: 9ba8f83eaea74049b215839fde3416241e4f0398253cbc981d7ae065771b55e3
4
+ data.tar.gz: a580a1bee903b11ef17d88183bbff6fcfe1729dd725104672e9724b80ba36922
5
5
  SHA512:
6
- metadata.gz: 0547da445c45cfc702e29f0ebee37900e97fb75a2804a60f913a61bbeead83eb0551e859449a2aaa038a13fa94f2d82d4f2fe3830483d45ccab4d26bfcf15fef
7
- data.tar.gz: 99349dfd8f855f53390323330e124b1ff61c467ac4cb434597df5a9e42f8c6d632347533364973516c2c636752a09460ea53c4690ae7b0701ffbb9257d928b2f
6
+ metadata.gz: 1ea820da50b5a7376cceb0108d1cc8ede27c3c0c98954613ece59cea1302ef41b9beeb19188d7fe7cd458571b7fb1c6978fdc775dea4c532057af6623fb77b83
7
+ data.tar.gz: 9a86716ef63bac572abe80cc978337fe4407b8367cae269dbd443d0fca0d1ae503826ce2174b921d9187262d4bea0bc4d5410c250f75965bb8d20ddcc94649ec
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 0.0.3 (2022-03-30)
5
+ ------------------
6
+
7
+ * Version bump
8
+
9
+ 0.0.2 (2022-03-30)
10
+ ------------------
11
+
12
+ * Version bump to push core
13
+
4
14
  0.0.1 (2022-03-28)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.3
@@ -1,22 +1,36 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- class TrueClass
3
+ TrueClass.class_eval do
4
4
  # :nodoc:
5
5
  def to_bool
6
6
  true
7
7
  end
8
8
  end
9
9
 
10
- class FalseClass
10
+ FalseClass.class_eval do
11
11
  # :nodoc:
12
12
  def to_bool
13
13
  false
14
14
  end
15
15
  end
16
16
 
17
- class NilClass
17
+ NilClass.class_eval do
18
18
  # :nodoc:
19
19
  def to_bool
20
20
  false
21
21
  end
22
22
  end
23
+
24
+ String.class_eval do
25
+ # :nodoc:
26
+ def to_bool
27
+ match?(/^(true|1|t|y|yes)$/i)
28
+ end
29
+ end
30
+
31
+ Numeric.class_eval do
32
+ # :nodoc:
33
+ def to_bool
34
+ to_s.to_bool
35
+ end
36
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_bool_extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Wyatt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-28 00:00:00.000000000 Z
11
+ date: 2022-03-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -44,5 +44,5 @@ requirements: []
44
44
  rubygems_version: 3.2.15
45
45
  signing_key:
46
46
  specification_version: 4
47
- summary: Adds `to_bool` methods to `TrueClass`, `FalseClass`, and `NilClass`
47
+ summary: Adds `to_bool` method to `TrueClass`, `FalseClass`, and `NilClass`
48
48
  test_files: []