diff options
author | Kyrylo Silin <silin@kyrylo.org> | 2019-05-26 12:47:45 +0300 |
---|---|---|
committer | Kyrylo Silin <silin@kyrylo.org> | 2019-05-26 12:47:45 +0300 |
commit | e7721ff5407831a71573ee0373c2f10baed0830f (patch) | |
tree | 8d7e3a275f9bbafa42e4e5f8c6408e26346c46f8 | |
parent | 7ca5facc1cf6b9021928ff4fcb7f6874cce904c5 (diff) | |
download | pry-e7721ff5407831a71573ee0373c2f10baed0830f.tar.gz |
output: rename 'boxed_io' to 'output'
Surely, `boxed_io` sounds way cooler than plain and boring `output` but I don't
think it helps for understanding the code. Although it *is* an IO object, we
treat it as output. Hence, it should be output (no boxes involved).
-rw-r--r-- | lib/pry/output.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/pry/output.rb b/lib/pry/output.rb index 6ecd8752..34a222d2 100644 --- a/lib/pry/output.rb +++ b/lib/pry/output.rb @@ -6,7 +6,7 @@ class Pry def initialize(pry_instance) @pry_instance = pry_instance - @boxed_io = pry_instance.config.output + @output = pry_instance.config.output end def puts(*objs) @@ -24,7 +24,7 @@ class Pry def print(*objs) objs.each do |obj| - @boxed_io.print decolorize_maybe(obj.to_s) + @output.print decolorize_maybe(obj.to_s) end nil end @@ -32,19 +32,19 @@ class Pry alias write print def tty? - @boxed_io.respond_to?(:tty?) && @boxed_io.tty? + @output.respond_to?(:tty?) && @output.tty? end def method_missing(method_name, *args, &block) - if @boxed_io.respond_to?(method_name) - @boxed_io.__send__(method_name, *args, &block) + if @output.respond_to?(method_name) + @output.__send__(method_name, *args, &block) else super end end def respond_to_missing?(method_name, include_private = false) - @boxed_io.respond_to?(method_name, include_private) + @output.respond_to?(method_name, include_private) end def decolorize_maybe(str) |