Class: NilClass

Inherits:
Object show all
Defined in:
lib/coalesce.rb

Instance Method Summary collapse

Instance Method Details

#_?(x = nil) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
14
# File 'lib/coalesce.rb', line 8

def _?(x = nil)
  if block_given?
    yield
  else
    x
  end
end