Class: Right
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#right? ⇒ Boolean
always true.
Methods included from Either
#<=>, #bimap, #each, #flat_map, #get_or_else, #initialize, #left?, #left_map, lefts, #map, #or_else, partition, rights, #to_a, #to_s, #~@
Methods included from UnionType
Methods included from Helper
Methods included from Control::Monad
Methods included from Control::Functor
Instance Method Details
#==(other) ⇒ Object
242 243 244 245 246 247 248 249 |
# File 'lib/data.either.rb', line 242 def == other case other when Right other.map { |v| return v == @v } else false end end |
#right? ⇒ Boolean
always true
238 239 240 |
# File 'lib/data.either.rb', line 238 def right? true end |