Sha256: db54c7d752335099f6d86c6ea0c0f0ad63fae3e4f6c0bec7d01149bdb51d43dc

Contents?: true

Size: 283 Bytes

Versions: 15

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

15 entries across 15 versions & 1 rubygems

Version Path
xot-0.1.21 lib/xot/block_util.rb
xot-0.1.20 lib/xot/block_util.rb
xot-0.1.19 lib/xot/block_util.rb
xot-0.1.16 lib/xot/block_util.rb
xot-0.1.15 lib/xot/block_util.rb
xot-0.1.14 lib/xot/block_util.rb
xot-0.1.13 lib/xot/block_util.rb
xot-0.1.12 lib/xot/block_util.rb
xot-0.1.11 lib/xot/block_util.rb
xot-0.1.10 lib/xot/block_util.rb
xot-0.1.9 lib/xot/block_util.rb
xot-0.1.8 lib/xot/block_util.rb
xot-0.1.7 lib/xot/block_util.rb
xot-0.1.6 lib/xot/block_util.rb
xot-0.1.5 lib/xot/block_util.rb