class Pry::Method

def pry_method?

Returns:
  • (Boolean) - Was the method defined within the Pry REPL?
def pry_method?
  source_file == Pry.eval_path
end