update 'cat' command to use _pry_.config.default_window_size

This commit is contained in:
Robert Gleeson 2014-02-07 01:55:48 +01:00
parent e24788f399
commit fd9a23eb30
2 changed files with 9 additions and 9 deletions

View File

@ -1,9 +1,9 @@
class Pry class Pry
class Command::Cat class Command::Cat
class ExceptionFormatter < AbstractFormatter class ExceptionFormatter < AbstractFormatter
attr_accessor :ex attr_reader :ex
attr_accessor :opts attr_reader :opts
attr_accessor :_pry_ attr_reader :_pry_
def initialize(exception, _pry_, opts) def initialize(exception, _pry_, opts)
@ex = exception @ex = exception
@ -23,7 +23,7 @@ class Pry
private private
def code_window_size def code_window_size
Pry.config.default_window_size || 5 _pry_.config.default_window_size || 5
end end
def backtrace_level def backtrace_level

View File

@ -1,9 +1,9 @@
class Pry class Pry
class Command::Cat class Command::Cat
class FileFormatter < AbstractFormatter class FileFormatter < AbstractFormatter
attr_accessor :file_with_embedded_line attr_reader :file_with_embedded_line
attr_accessor :opts attr_reader :opts
attr_accessor :_pry_ attr_reader :_pry_
def initialize(file_with_embedded_line, _pry_, opts) def initialize(file_with_embedded_line, _pry_, opts)
@file_with_embedded_line = file_with_embedded_line @file_with_embedded_line = file_with_embedded_line
@ -36,7 +36,7 @@ class Pry
end end
def code_window_size def code_window_size
Pry.config.default_window_size || 7 _pry_.config.default_window_size || 7
end end
def decorate(content) def decorate(content)