Sha256: 5eca4025c2801dd1dd3dda94f31f07f9102a33bb34e01e1a7e5ef34bde4b6d2e

Contents?: true

Size: 731 Bytes

Versions: 2

Compression:

Stored size: 731 Bytes

Contents

#
# Main container module for Pry-Byebug functionality
#
module PryByebug
  #
  # Checks that a target binding is in a local file context.
  #
  def file_context?(target)
    file = target.eval("__FILE__")
    file == Pry.eval_path || !Pry::Helpers::BaseHelpers.not_a_real_file?(file)
  end
  module_function :file_context?

  #
  # Ensures that a command is executed in a local file context.
  #
  def check_file_context(target, e = nil)
    e ||= "Cannot find local context. Did you use `binding.pry`?"
    raise(Pry::CommandError, e) unless file_context?(target)
  end
  module_function :check_file_context

  # Reference to currently running pry-remote server. Used by the processor.
  attr_accessor :current_remote_server
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/pry-byebug-3.6.0/lib/pry-byebug/base.rb
pry-byebug-3.6.0 lib/pry-byebug/base.rb