mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Make file_and_line method to be public (lib/pry/commands/cat/file_formatter.rb)
This commit is contained in:
parent
4b284f9aea
commit
08702ce1d8
1 changed files with 2 additions and 2 deletions
|
@ -19,14 +19,14 @@ class Pry
|
||||||
decorate(@code_from_file)
|
decorate(@code_from_file)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def file_and_line
|
def file_and_line
|
||||||
file_name, line_num = file_with_embedded_line.split(/:(?!\/|\\)/)
|
file_name, line_num = file_with_embedded_line.split(/:(?!\/|\\)/)
|
||||||
|
|
||||||
[file_name, line_num ? line_num.to_i : nil]
|
[file_name, line_num ? line_num.to_i : nil]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
def file_name
|
def file_name
|
||||||
file_and_line.first
|
file_and_line.first
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue