Class: NilClass
Instance Method Summary collapse
-
#ergo ⇒ Object
Compliments Kernel#ergo.
Instance Method Details
#ergo ⇒ Object
Compliments Kernel#ergo.
"a".ergo{ |o| o.upcase } #=> "A"
nil.ergo{ |o| o. } #=> nil
CREDIT: Daniel DeLorme
34 35 36 37 |
# File 'lib/dolzenko/core_ext/kernel/ergo.rb', line 34 def ergo @_ergo ||= Functor.new{ nil } @_ergo unless block_given? end |