Sha256: 2b85dd65308a0070f5d913f2679075a074d2f26e5314ca69653d1f675f3f9f01

Contents?: true

Size: 442 Bytes

Versions: 25

Compression:

Stored size: 442 Bytes

Contents

module Pry::Testable::Evalable
  def pry_tester(*args, &block)
    if args.length == 0 || args[0].is_a?(Hash)
      args.unshift(Pry.toplevel_binding)
    end
    Pry::Testable::PryTester.new(*args).tap do |t|
      t.singleton_class.class_eval(&block) if block
    end
  end

  def pry_eval(*eval_strs)
    b = String === eval_strs.first ? Pry.toplevel_binding : Pry.binding_for(eval_strs.shift)
    pry_tester(b).eval(*eval_strs)
  end
end

Version data entries

25 entries across 25 versions & 11 rubygems

Version Path
argon-1.3.1 vendor/bundle/ruby/2.7.0/gems/pry-0.12.2/lib/pry/testable/evalable.rb
symbolic_enum-1.1.5 vendor/bundle/ruby/2.7.0/gems/pry-0.12.2/lib/pry/testable/evalable.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/pry-0.12.2/lib/pry/testable/evalable.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/pry-0.12.2/lib/pry/testable/evalable.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/pry-0.12.2/lib/pry/testable/evalable.rb
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/pry-0.11.3/lib/pry/testable/evalable.rb
chess_engine-0.0.2 vendor/bundle/gems/pry-0.12.2/lib/pry/testable/evalable.rb
chess_engine-0.0.1 vendor/bundle/gems/pry-0.12.2/lib/pry/testable/evalable.rb
xaiml-0.1.3 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/evalable.rb
alimentos-alu0100945645-0.1.0 vendor/bundle/ruby/2.3.0/gems/pry-0.12.2/lib/pry/testable/evalable.rb
alimentos-alu0100945645-1.0.0 vendor/bundle/ruby/2.3.0/gems/pry-0.12.2/lib/pry/testable/evalable.rb
xaiml-0.1.2 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/evalable.rb
pry-0.12.2-java lib/pry/testable/evalable.rb
pry-0.12.2 lib/pry/testable/evalable.rb
pry-0.12.1 lib/pry/testable/evalable.rb
pry-0.12.1-java lib/pry/testable/evalable.rb
pry-0.12.0 lib/pry/testable/evalable.rb
pry-0.12.0-java lib/pry/testable/evalable.rb
xaiml-0.1.1 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/evalable.rb
xaiml-0.1.0 vendor/bundle/ruby/2.5.0/gems/pry-0.11.3/lib/pry/testable/evalable.rb