Sha256: 7b24e12d01e635cdd2c3bc81ad533876e8dea39621f6b7f78f894c01b3f0564d

Contents?: true

Size: 283 Bytes

Versions: 6

Compression:

Stored size: 283 Bytes

Contents

# -*- coding: utf-8 -*-


module Xot


  module BlockUtil

    def instance_eval_or_block_call(recv, *args, &block)
      if block.arity == 0
        recv.instance_eval(&block)
      else
        block.call recv, *args
      end
    end

    extend self

  end# BlockUtil


end# Xot

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
xot-0.1.27 lib/xot/block_util.rb
xot-0.1.26 lib/xot/block_util.rb
xot-0.1.25 lib/xot/block_util.rb
xot-0.1.24 lib/xot/block_util.rb
xot-0.1.23 lib/xot/block_util.rb
xot-0.1.22 lib/xot/block_util.rb