# -*- coding: utf-8 -*- module Xot module BlockUtil extend module ClassMethods def instance_eval_or_block_call (recv, *args, &block) if block.arity == 0 recv.instance_eval &block else block.call recv, *args end end self end# ClassMethods end# BlockUtil end# Xot