boolean_typecast 0.1.0 → 0.1.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 +4 -4
- data/Gemfile +0 -2
- data/README.md +24 -10
- data/boolean_typecast.gemspec +4 -1
- data/lib/boolean_typecast/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad237c1f32d5f98635836dc9142bdcb07f8eee9911c3879499d174dd38a1d76c
|
4
|
+
data.tar.gz: f3f0a635efbde826ed4244573a1f255b4a4104eb9bfb1d9945c77004d292ac4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76d32f4a9b46a8082d27a5b649e8fe5dcad011b83f5e1705a110b5ca632e0a9a5ada73a77d49b93ad7ec1cd5df928eca388ce930961e85c93d0af0c8858becca
|
7
|
+
data.tar.gz: 3822c5108f6054bc1b5ad56f9fe1c2a0c21ff03d88ec78dacc989cbd50e0726bcc1cf603a5464cd08edb1a08dd9b7d48072e5f17a40934c8887d5e5620c39ad5
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
# BooleanTypecast
|
2
2
|
|
3
|
-
|
3
|
+
## Description
|
4
4
|
|
5
|
-
|
5
|
+
Performs type casting from anything to true:TrueClass / false:FalseClass
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
true.to_bool? #=> true
|
9
|
+
nil.to_bool? #=> false
|
10
|
+
```
|
6
11
|
|
7
12
|
## Installation
|
8
13
|
|
@@ -22,17 +27,26 @@ Or install it yourself as:
|
|
22
27
|
|
23
28
|
## Usage
|
24
29
|
|
25
|
-
|
26
|
-
|
27
|
-
## Development
|
30
|
+
Just `require 'boolean_typecast'` and then use it as:
|
28
31
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
+
```ruby
|
33
|
+
require 'boolean_typecast'
|
34
|
+
|
35
|
+
# Example true values
|
36
|
+
true.to_bool? #=> true
|
37
|
+
0.to_bool? #=> true
|
38
|
+
''.to_bool? #=> true
|
39
|
+
{}.to_bool? #=> true
|
40
|
+
0.0.to_bool? #=> true
|
41
|
+
|
42
|
+
# Example false values
|
43
|
+
false.to_bool? #=> false
|
44
|
+
nil.to_bool? #=> false
|
45
|
+
```
|
32
46
|
|
33
47
|
## Contributing
|
34
48
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/surabhiojha12/boolean_typecast. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
50
|
|
37
51
|
## License
|
38
52
|
|
@@ -40,4 +54,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
54
|
|
41
55
|
## Code of Conduct
|
42
56
|
|
43
|
-
Everyone interacting in the BooleanTypecast project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
57
|
+
Everyone interacting in the BooleanTypecast project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/surabhiojha12/boolean_typecast/blob/master/CODE_OF_CONDUCT.md).
|
data/boolean_typecast.gemspec
CHANGED
@@ -11,9 +11,12 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = %q{Performs type conversion from anything to true:TrueClass / false:FalseClass}
|
13
13
|
spec.description = spec.summary
|
14
|
-
spec.homepage = ""
|
14
|
+
spec.homepage = "https://github.com/surabhiojha12/boolean_typecast"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
|
+
spec.required_ruby_version = '>= 2.4.7'
|
18
|
+
spec.required_rubygems_version = '>= 3.0.9'
|
19
|
+
|
17
20
|
# Specify which files should be added to the gem when it is released.
|
18
21
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
22
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boolean_typecast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Surabhi Ojha
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -71,7 +71,7 @@ files:
|
|
71
71
|
- boolean_typecast.gemspec
|
72
72
|
- lib/boolean_typecast.rb
|
73
73
|
- lib/boolean_typecast/version.rb
|
74
|
-
homepage:
|
74
|
+
homepage: https://github.com/surabhiojha12/boolean_typecast
|
75
75
|
licenses:
|
76
76
|
- MIT
|
77
77
|
metadata: {}
|
@@ -83,12 +83,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
83
83
|
requirements:
|
84
84
|
- - ">="
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
86
|
+
version: 2.4.7
|
87
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - ">="
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version:
|
91
|
+
version: 3.0.9
|
92
92
|
requirements: []
|
93
93
|
rubygems_version: 3.0.9
|
94
94
|
signing_key:
|