Class: TrueClass
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
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 |