Sha256: 25c11cd84a1146e66b97978262be20a1fe5815c11f7b3a6c72596e9f04802626

Contents?: true

Size: 770 Bytes

Versions: 6484

Compression:

Stored size: 770 Bytes

Contents

# frozen_string_literal: true

require "pry-byebug/helpers/location"

#
# Main container module for Pry-Byebug functionality
#
module PryByebug
  # Reference to currently running pry-remote server. Used by the processor.
  attr_accessor :current_remote_server

  module_function

  #
  # Checks that a target binding is in a local file context.
  #
  def file_context?(target)
    file = Helpers::Location.current_file(target)
    file == Pry.eval_path || !Pry::Helpers::BaseHelpers.not_a_real_file?(file)
  end

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

Version data entries

6,484 entries across 6,481 versions & 28 rubygems

Version Path
mux_ruby-3.20.0 vendor/bundle/ruby/3.2.0/gems/pry-byebug-3.9.0/lib/pry-byebug/base.rb
cybrid_api_bank_ruby-0.123.12 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_organization_ruby-0.123.12 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_id_ruby-0.123.12 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_bank_ruby-0.123.11 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_organization_ruby-0.123.11 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_id_ruby-0.123.11 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_id_ruby-0.123.10 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_bank_ruby-0.123.10 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_organization_ruby-0.123.10 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_organization_ruby-0.123.7 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_id_ruby-0.123.7 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_bank_ruby-0.123.7 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
ory-client-1.15.12 vendor/bundle/ruby/3.1.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_bank_ruby-0.123.4 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_id_ruby-0.123.4 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_organization_ruby-0.123.4 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_bank_ruby-0.123.3 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_organization_ruby-0.123.3 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb
cybrid_api_id_ruby-0.123.3 vendor/bundle/ruby/3.3.0/gems/pry-byebug-3.10.1/lib/pry-byebug/base.rb