ronad 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ronad/maybe.rb +9 -0
- data/lib/ronad/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a82e00f9bcba4e7a6155341249da26a213fdd501
|
4
|
+
data.tar.gz: ae3e3f1e170d23ce89367f91a2a957505e6d535b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c53689b785b9adc4e2912f57bf68d2726ba5329f70e6205b9fa0da17084afffe6ea8754f03406cc5a38b843dec3f0a3038f6f7a598eb7a8bf02973e4e6ac66d
|
7
|
+
data.tar.gz: 79cdef00ad7d7ab92b1fe2f9ce2d406cc5c04c3ddbf29ab1ee5325183783e8e27e7e58bda295c0974723210ec37408b6f2a153e3a7175ead8275e4671fbb2692
|
data/lib/ronad/maybe.rb
CHANGED
@@ -53,5 +53,14 @@ module Ronad
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
# "Fails" a maybe given a certain condition. If the condition is `true`
|
57
|
+
# then Maybe(nil) will be returned.
|
58
|
+
#
|
59
|
+
# @see continue
|
60
|
+
def halt
|
61
|
+
and_then do |value|
|
62
|
+
value unless yield value
|
63
|
+
end
|
64
|
+
end
|
56
65
|
end
|
57
66
|
end
|
data/lib/ronad/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ronad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Uri Gorelik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|