Class: Object

Inherits:
BasicObject
Defined in:
lib/utopia/extensions/maybe.rb

Instance Method Summary collapse

Instance Method Details

#maybe? {|_self| ... } ⇒ Boolean

A helper that allows you to avoid excessive number of i

Yields:

  • (_self)

Yield Parameters:

  • _self (Object)

    the object that the method was called on

Returns:

  • (Boolean)


9
10
11
# File 'lib/utopia/extensions/maybe.rb', line 9

def maybe?
	yield self
end