mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Rename "DEPRECATED" to "DISABLED"
Fix issue #817 (DEPRECATED: Use `edit` instead.) Rename `CommandSet#deprecated_command` to `#disabled_command`. Rename the file in "commands/", too.
This commit is contained in:
parent
6138218c94
commit
0bfad583f5
3 changed files with 5 additions and 5 deletions
|
@ -263,13 +263,13 @@ class Pry
|
|||
commands.delete(cmd.match)
|
||||
end
|
||||
|
||||
def deprecated_command(name_of_deprecated_command, deprecation_message, matcher=name_of_deprecated_command)
|
||||
create_command name_of_deprecated_command do
|
||||
def disabled_command(name_of_disabled_command, message, matcher=name_of_disabled_command)
|
||||
create_command name_of_disabled_command do
|
||||
match matcher
|
||||
description ""
|
||||
|
||||
define_method(:process) do
|
||||
output.puts "DEPRECATED: #{deprecation_message}"
|
||||
output.puts "DISABLED: #{message}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
Pry::Commands.deprecated_command("edit-method", "Use `edit` instead.")
|
||||
Pry::Commands.deprecated_command("show-command", "Use show-source [command_name] instead.")
|
2
lib/pry/commands/disabled_commands.rb
Normal file
2
lib/pry/commands/disabled_commands.rb
Normal file
|
@ -0,0 +1,2 @@
|
|||
Pry::Commands.disabled_command("edit-method", "Use `edit` instead.")
|
||||
Pry::Commands.disabled_command("show-command", "Use show-source [command_name] instead.")
|
Loading…
Reference in a new issue