module Fear::Either::Mixin
Include this mixin to access convenient factory methods. @example
include Fear::Either::Mixin Right('flower') #=> #<Fear::Right value='flower'> Left('beaf') #=> #<Fear::Legt value='beaf'>
Public Instance Methods
Left(value)
click to toggle source
@param value [any] @return [Fear::Left] @example
Left(42) #=> #<Fear::Left value=42>
# File lib/fear/either.rb, line 319 def Left(value) Fear.left(value) end
Right(value)
click to toggle source
@param value [any] @return [Fear::Right] @example
Right(42) #=> #<Fear::Right value=42>
# File lib/fear/either.rb, line 328 def Right(value) Fear.right(value) end