Class: FalseClass
Instance Method Summary collapse
- #if_false(false_proc, opts = {}) ⇒ Object (also: #ifFalse)
- #if_true(true_proc, opts = {}) ⇒ Object (also: #ifTrue)
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 |