Class: FalseClass

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

Instance Method Summary collapse

Instance Method Details

#if_false(false_proc, opts = {}) ⇒ Object Also known as: ifFalse



74
75
76
# File 'lib/smalltalkable.rb', line 74

def if_false(false_proc, opts={})
  false_proc.call
end

#if_true(true_proc, opts = {}) ⇒ Object Also known as: ifTrue



69
70
71
# File 'lib/smalltalkable.rb', line 69

def if_true(true_proc, opts={})
  (opts[:if_false] || opts[:ifFalse] || ->{nil}).call
end