Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/rbcurse/core/widgets/rwidget.rb
Instance Method Summary collapse
-
#yield_or_eval(&block) ⇒ Object
thanks to terminal-table for this method.
Instance Method Details
#yield_or_eval(&block) ⇒ Object
thanks to terminal-table for this method
41 42 43 44 45 46 47 48 |
# File 'lib/rbcurse/core/widgets/rwidget.rb', line 41 def yield_or_eval &block return unless block if block.arity > 0 yield self else self.instance_eval(&block) end end |