mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
update 'cat' command to use _pry_.config.default_window_size
This commit is contained in:
parent
e24788f399
commit
fd9a23eb30
2 changed files with 9 additions and 9 deletions
|
@ -1,9 +1,9 @@
|
|||
class Pry
|
||||
class Command::Cat
|
||||
class ExceptionFormatter < AbstractFormatter
|
||||
attr_accessor :ex
|
||||
attr_accessor :opts
|
||||
attr_accessor :_pry_
|
||||
attr_reader :ex
|
||||
attr_reader :opts
|
||||
attr_reader :_pry_
|
||||
|
||||
def initialize(exception, _pry_, opts)
|
||||
@ex = exception
|
||||
|
@ -23,7 +23,7 @@ class Pry
|
|||
private
|
||||
|
||||
def code_window_size
|
||||
Pry.config.default_window_size || 5
|
||||
_pry_.config.default_window_size || 5
|
||||
end
|
||||
|
||||
def backtrace_level
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
class Pry
|
||||
class Command::Cat
|
||||
class FileFormatter < AbstractFormatter
|
||||
attr_accessor :file_with_embedded_line
|
||||
attr_accessor :opts
|
||||
attr_accessor :_pry_
|
||||
attr_reader :file_with_embedded_line
|
||||
attr_reader :opts
|
||||
attr_reader :_pry_
|
||||
|
||||
def initialize(file_with_embedded_line, _pry_, opts)
|
||||
@file_with_embedded_line = file_with_embedded_line
|
||||
|
@ -36,7 +36,7 @@ class Pry
|
|||
end
|
||||
|
||||
def code_window_size
|
||||
Pry.config.default_window_size || 7
|
||||
_pry_.config.default_window_size || 7
|
||||
end
|
||||
|
||||
def decorate(content)
|
||||
|
@ -49,7 +49,7 @@ class Pry
|
|||
|
||||
def detect_code_type_from_file(file_name)
|
||||
code_type = @code_from_file.code_type
|
||||
|
||||
|
||||
if code_type == :unknown
|
||||
name, ext = File.basename(file_name).split('.', 2)
|
||||
case name
|
||||
|
|
Loading…
Reference in a new issue