mangrove 0.20.0 → 0.21.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
  SHA256:
3
- metadata.gz: 9c34eafde0fca548e6acf71869abe064150483068dab37f8342ff0cd58dfe243
4
- data.tar.gz: da24732f61b492d3c0a216ca808b6a841f5e0b232cfb8555698e19bb018f58ff
3
+ metadata.gz: 761b124e30c530cd26a779e7e789633a3e84ed545f639e6655dcfd637b132da0
4
+ data.tar.gz: 2b65549240b5f94a9d52714620c8664d734cf2a065e5e165e666b45ed56064c6
5
5
  SHA512:
6
- metadata.gz: 7983b9225105e0fa4de90a36fe7ad5965fb862c3c1cb2cf4abea69c7c4628b8b5ef872361bc9ccc4539ca16e96adfacd4c0c46b60b9107a1b089707d457398a3
7
- data.tar.gz: 5737af96594b2c70ce7ba6fd0de73e04152db84bfdeac518de0ddcf291f5cba33c00797d2f4fa4130d914ac07c99bfeecca8dfc7fd892d25c0755449482ad0a4
6
+ metadata.gz: 4ae0b59477a9855dce2947f97556b871a111f631bc931d07cfa6f1be9630532d73c4bd3e7c4d883ac5bc75a52cfdd588eb5e83c63f8be0bbece59c1ad8c35b27
7
+ data.tar.gz: fd0ace87a61d26da101a4b1ae13521c67922e0aed43f1c658c570b991e5e5226fa4fac87f8b3d92045322bc82ceb60340013d1fd61180c796dfff7c0a8f98ba9
@@ -30,6 +30,9 @@ module Mangrove
30
30
  sig { abstract.returns(OkType) }
31
31
  def unwrap!; end
32
32
 
33
+ sig { abstract.params(block: T.proc.params(err: ErrType).returns(Exception)).returns(OkType) }
34
+ def unwrap_or_raise_with!(&block); end
35
+
33
36
  sig { abstract.params(exception: Exception).returns(OkType) }
34
37
  def unwrap_or_raise!(exception); end
35
38
 
@@ -186,6 +189,11 @@ module Mangrove
186
189
  @inner
187
190
  end
188
191
 
192
+ sig { override.params(block: T.proc.params(err: ErrType).returns(Exception)).returns(OkType) }
193
+ def unwrap_or_raise_with!(&block)
194
+ @inner
195
+ end
196
+
189
197
  sig { override.returns(OkType) }
190
198
  def unwrap_or_raise_inner!
191
199
  @inner
@@ -350,6 +358,11 @@ module Mangrove
350
358
  raise exception
351
359
  end
352
360
 
361
+ sig { override.params(block: T.proc.params(err: ErrType).returns(Exception)).returns(OkType) }
362
+ def unwrap_or_raise_with!(&block)
363
+ raise block.call(@inner)
364
+ end
365
+
353
366
  sig { override.returns(OkType) }
354
367
  def unwrap_or_raise_inner!
355
368
  raise T.unsafe(@inner)
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Mangrove
5
- VERSION = "0.20.0"
5
+ VERSION = "0.21.0"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mangrove
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuma Murata