Class: TrueClass

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



62
63
64
# File 'lib/smalltalkable.rb', line 62

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

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



57
58
59
# File 'lib/smalltalkable.rb', line 57

def if_true(true_proc, opts={})
  true_proc.call
end