class Kind::Maybe::Monad::Wrapper
Public Instance Methods
none(matcher = UNDEFINED) { |value| ... }
click to toggle source
# File lib/kind/maybe/monad/wrapper.rb, line 7 def none(matcher = UNDEFINED) return if @monad.some? || output? @output = yield(@monad.value) if @monad.maybe?(matcher) end
some(matcher = UNDEFINED) { |value| ... }
click to toggle source
# File lib/kind/maybe/monad/wrapper.rb, line 13 def some(matcher = UNDEFINED) return if @monad.none? || output? @output = yield(@monad.value) if @monad.maybe?(matcher) end