如何设置我的撬动提示为当前的时间戳?(How can I set my Pry prompt to

2019-10-19 11:19发布

当我把下面的行到~/.pryrc如预期它不工作:

Pry.config.prompt_name = Time.now.to_s

每一个提示等于撬推出的时间。

如何更新与当前的时间戳,每次显示提示时间(每次通话后)的提示吗?

Answer 1:

您需要使用promptprompt_name

Pry.config.prompt = Proc.new { |output, value| Time.now.to_s[0..-6] } 


文章来源: How can I set my Pry prompt to be the current timestamp?