Class: Left
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#left? ⇒ Boolean
always true.
Methods included from Either
#<=>, #bimap, #each, #flat_map, #get_or_else, #initialize, #inspect, #left_map, lefts, #map, #or_else, partition, #right?, rights, #to_a, try, #~@
Methods included from UnionType
Methods included from Helper
Methods included from Control::Monad
Methods included from Control::Applicative
Methods included from Control::Functor
Instance Method Details
#==(other) ⇒ Object
235 236 237 238 239 240 241 242 |
# File 'lib/data.either.rb', line 235 def ==(other) case other when Left other.left_map { |v| return v == @v } else false end end |
#left? ⇒ Boolean
always true
231 232 233 |
# File 'lib/data.either.rb', line 231 def left? true end |