class Kind::Result::Monad::Wrapper
Public Instance Methods
failure(types = Undefined, matcher = Undefined) { |value| ... }
click to toggle source
# File lib/kind/result/monad/wrapper.rb, line 7 def failure(types = Undefined, matcher = Undefined) return if @monad.success? || output? @output = yield(@monad.value) if @monad.result?(types, matcher) end
success(types = Undefined, matcher = Undefined) { |value| ... }
click to toggle source
# File lib/kind/result/monad/wrapper.rb, line 13 def success(types = Undefined, matcher = Undefined) return if @monad.failure? || output? @output = yield(@monad.value) if @monad.result?(types, matcher) end