class Object

Constants

EXCLUDE

Public Instance Methods

<<(line) click to toggle source
# File lib/pry-moves/traversing.rb, line 62
def <<(line)
  return if EXCLUDE.any? do |cls|
    line.match(cls.match)
  end
  push line
end
add_marker(marker_lineno) click to toggle source
# File lib/pry-moves/pry_ext.rb, line 79
def add_marker(marker_lineno)
  marker = lineno == marker_lineno ?
     Pry.config.marker : "  "
  tuple[0] = " #{marker} #{ line }"
end
build_output() click to toggle source
# File lib/pry-moves/pry_ext.rb, line 58
def build_output
  lines = []
  lines << "#{text.bold('From:')} #{PryMoves::Helpers.shorten_path location}"
  lines << PryMoves::Watch.instance.output(target) unless PryMoves::Watch.instance.empty?
  lines << ''
  lines << "#{code.with_line_numbers(use_line_numbers?).with_marker(marker).highlighted}"
  lines << ''
  lines.join "\n"
end
location() click to toggle source
# File lib/pry-moves/pry_ext.rb, line 68
def location
  me = target.eval 'self' rescue nil
  me = PryMoves::Painter.colorize me if me
  file = defined?(Rails) ? @file.gsub(Rails.root.to_s, '') : @file
  "#{file}:#{@line} #{me}"
end
process() click to toggle source

Negligent function from Pry - evidently poor output format would be wanted to be changed often by developers, but definition so long… :(

# File lib/pry-moves/pry_ext.rb, line 41
def process
  if bad_option_combination?
    raise CommandError, "Only one of -m, -c, -f, and  LINES may be specified."
  end

  if nothing_to_do?
    return
  elsif internal_binding?(target)
    handle_internal_binding
    return
  end

  set_file_and_dir_locals(@file)

  _pry_.pager.page build_output
end
pry() click to toggle source
# File lib/pry-moves/pry_ext.rb, line 25
def pry
  unless Pry.config.disable_breakpoints
    PryMoves.synchronize_threads ||
      return # Don't start binding.pry when semaphore locked by current thread
    pry_forced
  end
end
Also aliased as: pry_forced
pry_forced()
Alias for: pry