Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/canis/core/widgets/rwidget.rb
Overview
yeild eval {{{
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
38 39 40 41 42 43 44 45 |
# File 'lib/canis/core/widgets/rwidget.rb', line 38 def yield_or_eval &block return unless block if block.arity > 0 yield self else self.instance_eval(&block) end end |