diff options
author | Kyrylo Silin <silin@kyrylo.org> | 2018-10-20 01:10:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-20 01:10:17 +0800 |
commit | 3691191b474f85b19ebc979c5d22941211cdcb1d (patch) | |
tree | b6ad3e59b4a31a246227c15ec8ed96e4b4dec1cb | |
parent | e3b579adeffeccc3e5b2445a64bb249c4c750dd2 (diff) | |
parent | ade91c84177386f90eeb50457dcef1c1e3770dd7 (diff) | |
download | pry-3691191b474f85b19ebc979c5d22941211cdcb1d.tar.gz |
Merge pull request #1817 from pry/output-input-array-deprecation
pry_instance: deprecate '#output_array' & '#input_array'
-rw-r--r-- | lib/pry/pry_instance.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb index c102acc9..891e8aaa 100644 --- a/lib/pry/pry_instance.rb +++ b/lib/pry/pry_instance.rb @@ -21,6 +21,7 @@ # * the IRC channel, which is #pry on the Freenode network # +# rubocop:disable Metrics/ClassLength class Pry attr_accessor :binding_stack attr_accessor :custom_completions @@ -34,8 +35,13 @@ class Pry attr_reader :last_exception attr_reader :command_state attr_reader :exit_value + + # @since v0.12.0 attr_reader :input_ring + + # @since v0.12.0 attr_reader :output_ring + attr_reader :config extend Pry::Config::Convenience @@ -81,6 +87,20 @@ class Pry exec_hook(:when_started, target, options, self) end + # @deprecated Use {#input_ring} instead. + def input_array + warn "[DEPRECATED] '#{self.class.name}##{__method__}' is deprecated. " \ + "Use '#{self.class.name}#input_ring' instead." + @input_ring + end + + # @deprecated Use {#output_ring} instead. + def output_array + warn "[DEPRECATED] '#{self.class.name}##{__method__}' is deprecated. " \ + "Use '#{self.class.name}#output_ring' instead" + @output_ring + end + # The current prompt. # This is the prompt at the top of the prompt stack. # @@ -666,3 +686,4 @@ class Pry config.quiet end end +# rubocop:enable Metrics/ClassLength |