Sha256: d6f5fa7d85eb571a118d25ff0f69cbf3845b37595d1310eb20cbf9eb1c20a455

Contents?: true

Size: 282 Bytes

Versions: 5

Compression:

Stored size: 282 Bytes

Contents

module Kernel


  # Evaluate code in a metaclass. This is equivalent to
  # 'meta_class.instance_eval'.
  #
  # CREDIT: WhyTheLuckyStiff

  def meta_eval(str=nil, &blk)
    if str
      meta_class.instance_eval(str)
    else
      meta_class.instance_eval(&blk)
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
facets-2.8.4 lib/core/facets/kernel/meta_eval.rb
facets-2.8.3 lib/core/facets/kernel/meta_eval.rb
facets-2.8.2 lib/core/facets/kernel/meta_eval.rb
facets-2.8.1 lib/core/facets/kernel/meta_eval.rb
facets-2.8.0 lib/core/facets/kernel/meta_eval.rb