mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
shorten DEFAULT_PROC
This commit is contained in:
parent
e8f5d55c31
commit
9cb03413de
1 changed files with 2 additions and 10 deletions
12
lib/pry.rb
12
lib/pry.rb
|
@ -66,19 +66,11 @@ class Pry
|
|||
# The default prompt; includes the target and nesting level
|
||||
DEFAULT_PROMPT = [
|
||||
proc { |target_self, nest_level, pry|
|
||||
if nest_level == 0
|
||||
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)})> "
|
||||
else
|
||||
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)}):#{nest_level}> "
|
||||
end
|
||||
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)})#{":#{nest_level}" unless nest_level.zero?}> "
|
||||
},
|
||||
|
||||
proc { |target_self, nest_level, pry|
|
||||
if nest_level == 0
|
||||
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)})* "
|
||||
else
|
||||
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)}):#{nest_level}* "
|
||||
end
|
||||
"[#{pry.input_array.size}] pry(#{Pry.view_clip(target_self)})#{":#{nest_level}" unless nest_level.zero?}* "
|
||||
}
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in a new issue