diff options
author | Kyrylo Silin <silin@kyrylo.org> | 2019-04-08 00:44:38 +0300 |
---|---|---|
committer | Kyrylo Silin <silin@kyrylo.org> | 2019-04-08 00:44:38 +0300 |
commit | f6d475d740ea620755b03a14b014dc647475470d (patch) | |
tree | 0d602f95b0d13c00c48259087bf1bbf4715e5ac7 | |
parent | 8d4cbe49b9acec6109cdc9a2020bfcd40cca4699 (diff) | |
download | pry-f6d475d740ea620755b03a14b014dc647475470d.tar.gz |
command: delete #hooks
This was deprecated 4 years ago, so I guess it's time to remove it.
-rw-r--r-- | lib/pry/command.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/pry/command.rb b/lib/pry/command.rb index ff42efa6..86f1c924 100644 --- a/lib/pry/command.rb +++ b/lib/pry/command.rb @@ -187,12 +187,6 @@ class Pry end end - # @deprecated Replaced with {Pry::Hooks#add_hook}. Left for compatibility. - # Store hooks to be run before or after the command body. - def hooks - Pry.hooks - end - def command_regex pr = Pry.respond_to?(:config) ? Pry.config.command_prefix : "" prefix = convert_to_regex(pr) @@ -482,7 +476,7 @@ class Pry def find_hooks(event) event_name = "#{event}_#{command_name}" - (hooks || self.class.hooks).get_hooks(event_name).values + (hooks || Pry.hooks || self.class.hooks).get_hooks(event_name).values end def before_hooks |