Sha256: 57564b53f1fe46917784c5936c6d18065a37a6cd7ba6be3ee7f840bac06db3f9

Contents?: true

Size: 615 Bytes

Versions: 2

Compression:

Stored size: 615 Bytes

Contents

require 'facets/functor'

$PRY_TABLE = {} #Hash.new{|h,k| h[k]=nil}

# Pry allows you to test private and protected methods,
# via a public-only interface.
#
# Generally one should avoid testing private and protected
# method directly, instead relying on tests of public methods to
# indirectly test them, because private and protected methods are
# considered implementation details. But sometimes is necessary
# to test them directly, or if you wish to achieve *absolute
# coverage*, say in mission critical systems.

def pry
  $PRY_TABLE[self] ||= Functor.new do |op, *a, &b|
    __send__(op, *a, &b)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lemon-0.6 lib/lemon/kernel.rb
lemon-0.5 lib/lemon/kernel.rb