module Corefines::Object::Else
@!method else
Returns +self+ if +self+ evaluates to +true+, otherwise returns the evaluation of the block. @yield [self] gives +self+ to the block. @return [Object] +self+ if +self+ evaluates to +true+, otherwise returns the evaluation of the block.
Public Instance Methods
else() { |self| ... }
click to toggle source
# File lib/corefines/object.rb, line 143 def else self ? self : yield(self) end