fried-typings 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fdad342c7e4505ad1f879fa13beff53c4452509b
4
- data.tar.gz: 64c059ec678fbf509b0124bdce734c629c395c23
3
+ metadata.gz: 46d2f19f732eb4821dcdee784a60c25ee4a3c118
4
+ data.tar.gz: 4f52e87f056dc830a09bf292203c5ec3fffaf118
5
5
  SHA512:
6
- metadata.gz: eec2126b69867be8d088e212ff2149ff666f26b1b2a535d86dfdde20e4235ec726320dc8b2a89fdb17d0b8fd27964ae0139219a3ad3a41bf3a1181f9b50bc300
7
- data.tar.gz: e1450577b4a5a69c435c561d99064e8548dff406bf304cbdb90561f1d2b82bfb3dc3418aee93ff793fe7e467118e34ef5a2d3a57efcb0ffc37933a2da4586a74
6
+ metadata.gz: 1750425c12561b89dc9ffb4003ec61b60d547baad54dd181678c02c36c19bac1efe7ce972b5be6ef9d2b131542f545e4b754606f3fef6ca15c82682fd45485b3
7
+ data.tar.gz: ab3f194223f8855f6b2d139b1740d61d73bba0a9a8c628d53e5b6c2cbedb00d1d782318f3bd54f0d291cf1284293b7017fd1265fe6a8c7e848fb6a6c30787373
data/README.md CHANGED
@@ -70,6 +70,7 @@ one_of.(ArgumentError.new) # => false
70
70
  - `StrictlyOneOf[type1, type2, ...typeN]` checks that object pass
71
71
  `IsStrictly[typeN]` for **any** of the types
72
72
  - `Anything` matches any object
73
+ - `Nothing` matches any object
73
74
  - `Boolean` checks that object is either `true` or `false`
74
75
  - `ArrayOf[type]` checks that all element of the array pass `Is[type]`
75
76
  - `HashOf[key_type, value_type]` checks that all pairs of hash pass
@@ -0,0 +1,7 @@
1
+ require "fried/core"
2
+ require "fried/typings/one_of"
3
+
4
+ module Fried::Typings
5
+ # Never matches any object
6
+ Nothing = OneOf[]
7
+ end
@@ -1,5 +1,5 @@
1
1
  module Fried
2
2
  module Typings
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fried-typings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fire-Dragon-DoL
@@ -147,6 +147,7 @@ files:
147
147
  - lib/fried/typings/is.rb
148
148
  - lib/fried/typings/is_strictly.rb
149
149
  - lib/fried/typings/meta_type.rb
150
+ - lib/fried/typings/nothing.rb
150
151
  - lib/fried/typings/one_of.rb
151
152
  - lib/fried/typings/strictly_one_of.rb
152
153
  - lib/fried/typings/tuple_of.rb