Module: Mores::BlockInitialize
- Included in:
- Succession
- Defined in:
- lib/mores/block_initialize.rb
Instance Method Summary collapse
Instance Method Details
#new(*args, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/mores/block_initialize.rb', line 4 def new(*args, &block) case block_given? and block.arity when 0 super(*args, &nil).tap { |x| x.instance_exec &block } when 1 super(*args, &nil).tap &block else super end end |