File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1+ require 'concurrent/synchronization'
2+
13module Concurrent
24
35 # A `Maybe` encapsulates an optional value. A `Maybe` either contains a value
@@ -99,8 +101,9 @@ module Concurrent
99101 #
100102 # @see https://hackage.haskell.org/package/base-4.2.0.1/docs/Data-Maybe.html Haskell Data.Maybe
101103 # @see https://github.com/purescript/purescript-maybe/blob/master/docs/Data.Maybe.md PureScript Data.Maybe
102- class Maybe
104+ class Maybe < Synchronization :: Object
103105 include Comparable
106+ safe_initialization!
104107
105108 # Indicates that the given attribute has not been set.
106109 # When `Just` the {#nothing} getter will return `NONE`.
@@ -168,15 +171,15 @@ def self.nothing(error = '')
168171 end
169172
170173 # Is this `Maybe` a `Just` (successfully fulfilled with a value)?
171- #
174+ #
172175 # @return [Boolean] True if `Just` or false if `Nothing`.
173176 def just?
174177 ! nothing?
175178 end
176179 alias :fulfilled? :just?
177180
178181 # Is this `Maybe` a `nothing` (rejected with an exception upon fulfillment)?
179- #
182+ #
180183 # @return [Boolean] True if `Nothing` or false if `Just`.
181184 def nothing?
182185 @nothing != NONE
You can’t perform that action at this time.
0 commit comments