/ Published in: Ruby
Expand |
Embed | Plain Text
def yield_or_eval &block return unless block if block.arity > 0 yield self else self.instance_eval(&block) end end
You need to login to post a comment.
def yield_or_eval &block return unless block if block.arity > 0 yield self else self.instance_eval(&block) end end
You need to login to post a comment.