Sha256: 793c27a78bf3235ec9a0a7e554768312eb540daeb480f9764af271db441e3f8d

Contents?: true

Size: 663 Bytes

Versions: 3

Compression:

Stored size: 663 Bytes

Contents

require 'facets/functor'

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

module Kernel

  # 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

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lemon-0.8.1 lib/lemon/kernel.rb
lemon-0.8.0 lib/lemon/kernel.rb
lemon-0.7.0 lib/lemon/kernel.rb