module PryMoves

Constants

Commands
TRACE_IGNORE_FILES
VERSION

Attributes

current_remote_server[RW]

Reference to currently running pry-remote server. Used by the tracer.

is_open[RW]

Public Instance Methods

check_file_context(target) click to toggle source

Checks that a binding is in a local file context. Extracted from github.com/pry/pry/blob/master/lib/pry/default_commands/context.rb

# File lib/pry-moves.rb, line 30
def check_file_context(target)
  file = target.eval('__FILE__')
  file == Pry.eval_path || (file !~ /(\(.*\))|<.*>/ && file != '' && file != '-e')
end
lock() click to toggle source
# File lib/pry-moves.rb, line 43
def lock
  semaphore.lock unless semaphore.locked?
end
locked?() click to toggle source
# File lib/pry-moves.rb, line 39
def locked?
  semaphore.locked?
end
open?() click to toggle source
# File lib/pry-moves.rb, line 51
def open?
  @is_open
end
semaphore() click to toggle source
# File lib/pry-moves.rb, line 35
def semaphore
  @semaphore ||= Mutex.new
end
synchronize_threads() click to toggle source
# File lib/pry-moves.rb, line 55
def synchronize_threads
  return true if Thread.current[:pry_moves_debug]

  semaphore.synchronize {} rescue return
  true
end
unlock() click to toggle source
# File lib/pry-moves.rb, line 47
def unlock
  semaphore.unlock unless Thread.current[:pry_moves_debug]
end